Hello,
I have a table called User, and a table called Model. Where Model has
relation with User.
So, Symfony with Doctrine generated for me a BaseUser with it:
* @method Doctrine_Collection getModel() Returns the current
record's "Model" collection
* @method User setModel() Sets the current
record's "Model" collection
So, i tought that getModel will return for me all models that an user
have. But it is getting me an error:
Unknown column user_id
1. at ()
in SF_ROOT_DIR\lib\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor
\doctrine\Doctrine\Query.php line 752 ...
752. throw new
Doctrine_Query_Exception('Unknown column ' . $field);
So, what exactly is that getModel() what it should return me?
My user object is getting from a query, this one:
public function getUserByUsernameAndPassword($username, $password) {
$q = $this->createQuery("u")
->where("u.username = ?", $username)
->andWhere("u.password = ?", $password);
return $q->fetchOne();
}
so i get that and try to use $user->getName() and it works.
Thanks.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en