my models:
execution hasMany result
state hasMany result
result belongsTo execution,state


What I want to do:
>From the execution View, I need to now the state of all the result


I try to set the recursive at 2 from the execution controller:
$this->set('data',
$this->Execution->findAll($conditions,null,null,null,1,2));

In the view I only got
the right $data['execution']['result']['state_id']
but $data['execution']['result']['state'] is still null

That's how the query is build
SELECT `state`.`id`, `state`.`name` FROM `state` AS `state` WHERE
`state`.`id` = {$__cakeForeignKey__$}

and the query:
SELECT `state`.`id`, `state`.`name` FROM `state` AS `state` WHERE
`state`.`id` = NULL

Why did I got `state`.`id` = NULL ???

I hope someone can understood my problem


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to