Hmm... nobody have any ideas?

On Tue, Nov 24, 2009 at 4:05 PM, Bryan Paddock <[email protected]>wrote:

> Hey all,
>
> I have this relationship in question:
>
> User -> hasOne Student -> hasMany Submission
>
> I'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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to