Absolutely.

$this->tble1->recursive=1;
$this->findAll('`tablw2`.`f1` LIKE \'%$val1.%'\' etc. ')

On Jun 18, 2:00 am, jaanu2121 <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is it possible to define conditions on 2nd level (or higher order)
> associations in containable behavior?
>
> e.g. the model association chain is , TableOne <hasOne> TableTwo
> <hasOne> TableThree
>
>  and I need to find all from TableOne where TableTwo.type= "val1" and
> TableThree.value="val2"
>  where 'type' and 'value' are columns in respective tables.
>
> I have tried the following but it is not working..
>
>  TableOne->find("all",
> array(  "contain"=>array("TableTwo"=>array("TableThree")),
>
> "conditions"=>array("TableTwo.type"=>"val1",
>
> "TableThree.value"=>"val2") ))
>
> Thanks for the time,
>  Sudhir
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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