ah, thanks for the reply.  using the fake hasOne relationship worked.
but, the page still performs a *ton* of sql queries.  is ther any way
of limiting this?

On Dec 21, 1:21 am, "AD7six" <[EMAIL PROTECTED]> wrote:
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?

> *vTo find all forests that contain a brown tree, you can achieve that by
using the search and 
cheatinghttp://groups-beta.google.com/group/cake-php/tree/browse_frm/thread/f...

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