Use a join. I don't know which page in the manual to link to so search
online  for "cakephp find join".

On Tue, Jul 31, 2012 at 8:01 PM, lirc201 <[email protected]> wrote:
> I have an Order that hasMany LineItems.  I only want to extract an Order if
> certain LineItems.fields meet my conditions.
>
> I'm using
>
> $this->Order->find('list', array(
>                 'conditions' => array('LineItem.event_id' => '3',
>                                       'LineItem.pulled' => '1'),
>         //        'order' => array(Order.id => 'asc'),
>                 'recursive' => '2'
>         ));
>
> However all I get is ALL Orders.
>
> Any ideas, thanks
> Brian
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to