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 <brian.e.lavelle@gmail.com> 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
> cake-php+unsubscribe@googlegroups.com 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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Wednesday, August 1, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment