Hi, bakers.
I have two models (Foo and Bar) associated with each other through a habtm
association. When i findAll() on the Foo model i get something like:
Array
(
[0] => Array
(
[Foo] => Array
(
[id] => 1
[name] => Foo one
[Bar] => Array
(
[0] => Array
(
[id] => 1
[name] => Bar one
)
[1] => Array
(
[id] => 2
[name] => Bar two
)
)
)
)
I would like to know how(if) i can impose conditions to the tuples of
Foo based on tuples of Bar. For example, can i findAll() only the tuples of
Foo that have an associated Bar tuple with id = 1 ?
Can Cake do this for me or do i have to hand-write the query?
Thanks in advance.
--
Gonçalo Marrafa <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---