If you change your UserPermission definition to this:
UserPermission:
columns:
user_id:
type: integer
primary: true
permission_id:
type: integer
primary: true
relations:
User:
foreignAlias: UserPermissions
Permission:
Then you will be able to use: $user->getUserPermissions();
If you just want to create a standard query, then just use the names of the
tables like maybe:
UserTable::getInstance()->createQuery('u')->leftJoin('UserPermission
p')->where('p.some_field = ?', 89);
Hope this is what you were looking for, I'm not quite sure what your
question actually is ;)
2010/8/21 Ettore <[email protected]>
> I don't know if this can solve your problem, anyway have a look at
>
> http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#relationships:join-table-associations
>
> With user->Permissions you should get a Doctrine_Collection of
> Doctrine_Records .
> Creating a new tuple shuld be like:
> $userPerm = new UserPermission:
> $userPerm->User = new User() (or existing one)
> $userPerm->Permission = new Permission() (or existing one)
>
> I'm going to facing this problem next days for a project, so i'm not
> really sure if that's right.
>
> --
> 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]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
--
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