On Tue, Nov 24, 2009 at 4:05 PM, Bryan Paddock <bryanpaddock@gmail.com> wrote:
Hey all,I have this relationship in question:User -> hasOne Student -> hasMany SubmissionI'm a bit stumped on how I can fetch all the users who do not have any submissions linked to their name.I've tried:$list = $this->User->find('all', array('contain' => array('Student' => array('Submission' => array('conditions' => array('Submission.student_id' => null)),))));I have the actAs in the model so the containable behaviour is functioning - there is just a problem with my specific query.Any ideas?thanks!
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment