On Dec 21, 3:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
first off, it seems like the page would probably run faster if it was
just one query instead of 30 or 40.

but the other reason is to filter results or get variables from the
other model. for instance, if Forrest has many Trees and i query
Forrest wanting to only return Trees that are Brown, how is it possible
to check if Trees.Brown from the query on Forrest if it is not joined?

*v

To find all forests that contain a brown tree, you can achieve that by
using the search and cheating
http://groups-beta.google.com/group/cake-php/tree/browse_frm/thread/f23b1825050ad543/0e1deb52d028b5d5?rnum=1&_done=%2Fgroup%2Fcake-php%2Fbrowse_frm%2Fthread%2Ff23b1825050ad543%2F%3F#doc_e793267f42fa77fd

To find all brown trees for a forest, you would define that in the
association definition (e.g. by using bindModel and defining a
condition).

To do both, find only forrests that have a brown tree, and list all
brown trees by forrest, you would do both.

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just a browser
here:http://irc.cakephp.org).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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