Re: findAll recursive problem

2006-05-12 Thread theo

OK, I figured this out, though I'm not too thrilled with the solution.

It turns out the recursive functionality is very particular as to what
you name your hasMany relationship.

My Workflow hasMany relationship for Step was named "Step". When I
renamed it to "step", suddenly all my steps where populated with their
respective Rules.

Odd.


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



findAll recursive problem

2006-05-12 Thread theo

Hi there,

I'm also having a problem getting recursive data back greater than 1
level deep. Here's my data model:

Workflow hasMany Steps
Step hasMany Rules

I execute:

$workflow->id = 1;
$workflow->recursive = 3;
$workflow->findAll();

Result:

Workflow has Steps array populated, but all the Steps have empty Rules
arrays. The SQL that is returned trying to load the rules is:

SELECT `Rule`.`id`, `Rule`.`step_id`, `Rule`.`left_value`,
`Rule`.`right_value`, `Rule`.`comparison_operator`, `Rule`.`position`
FROM `rules` AS `Rule` WHERE `Rule`.`step_id`=NULL


HOWEVER, if I just read a Step directly, the Rules array is populated
perfectly.

Can someone help me out with this one? It appears to be an actual bug.

-Theo


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