In $this->modelA->findAll(), can I include fieldnames from associated
models in my $conditions parameter ?

Eg.

I have these associations:

A hasMany B
B hasMany C

C belongsTo B
B belongsTo A

I have a search box which submits the user to A/search (controller A,
action search).

The user is expecting data from all three models in his display,
according to various conditions on those fields.

I would like to include conditions for all the fields in controller
A's findAll() .

Can I do something like:

$results = $this->A->findAll ("A.field1 = B.field2 AND C.field3 = 0
GROUPBY C.field3", ... "rest of params" ...);  ? 

Thx.


--~--~---------~--~----~------------~-------~--~----~
 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to