You have to use $this->Model->bindModel() to help cake with the joins:

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

has some examples further down the page.

On Apr 1, 4:05 pm, Zac Tolley <zac.tol...@gmail.com> wrote:
> I've done complex selection before, the difference here is that is
> seems to split the operation up into multiple queries and I can't see
> how I would do it in this situation... I'm going to give it a stab and
> see what happens.
>
> On Apr 1, 4:01 pm, Jeremy Burns <jeremybu...@me.com> wrote:
>
>
>
> > It's a bit tricky, but you can do 'ORs' and 
> > ANDs':http://book.cakephp.org/view/1030/Complex-Find-Conditions
>
> > Jeremy Burns
> > jeremybu...@me.com
>
> > On 1 Apr 2010, at 15:58, Lucca Mordente wrote:
>
> > > I don't know whether it's possible... I think custom query would be the 
> > > best solution.
> > > Lucca Mordente
>
> > > On Thu, Apr 1, 2010 at 11:52 AM, Zac Tolley <zac.tol...@gmail.com> wrote:
>
> > > I'll give that a go, but then I want to use or's... like I want to to
> > > say if user.username = 'xyz' or item.name = 'xyz'....
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > > To unsubscribe, reply using "remove me" as the subject.
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 
> > > athttp://groups.google.com/group/cake-php?hl=en

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