I've searched and looked through this group and the online
documentation for hours, but I'm having some difficulty with a simple
problem.

Its a simple setup:

User HABTM Permissions

Everything is setup properly (3 tables: users, users_permissions,
permissions).  And everything works fine, I'm just trying to make a
simple select.

I want a list of the permission for a certain user.

I can get a list of all permission: $this->Permission->find('list',
array('fields'=>'id'))

but i cannot seem to find the proper syntax to limit it to one user.
Everytime I try to limit the results by the user as the HABTM cake
documentation says:

$this->Permission->User->findById('4',
array('fields'=>'Permission.*')) or
$this->Permission->User->find('all',
array('conditions'=>array('User.id'=>'4'),
'fields'=>array('Permission.*')))

The generated query drops the inner join to the permission table, and
only selects the user.

Or I can get a list of the User and all its Permissions in a rather
large array, but I cannot get a list.

Can anyone help?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to