I don't think something like that exists within cake, but you could add this in your afterFind method in your model.
Adam On Dec 28, 10:44 am, bpscrugs <[EMAIL PROTECTED]> wrote: > i'm using cakephp to construct a logical data model array that will be > passed to a flex app. I have the following model association: > ServiceDay->(hasMany)ServiceTime->(hasMany)ServiceTimePrice. So what > the current output from my findall is something like this example: > > Array( > [0] => Array( > [ServiceDay] => Array( > [service_day_id] => 123 > [day]=> 3242 > [etc fields...] > ) > [ServiceTime] => Array( > [0] => Array( > [service_time_id] => 88 > [service_day_id] => 123 > [ServiceTimePrice] => Array( > [0] = Array( > [service_time_price_id] =>85 > [service_time_id] =>88 > [etc fields...] > ) > [1] = Array( > [service_time_price_id] =>899 > [service_time_id] =>88 > [etc fields...] > ) > [1] => Array( > [service_time_id] => 89 > [service_day_id] => 123 > [ServiceTimePrice] => Array( > [0] = Array( > [service_time_price_id] =>456 > [service_time_id] =>89 > [etc fields...] > ) > [1] = Array( > [service_time_price_id] =>346 > [service_time_id] =>89 > [etc fields...] > ) > ) > ) > ) > > for a correct data model in flex, the logic should be that the > [ServiceTime] array is nested within the [ServiceDay] array, but with > this findall call that result is obviously not the case. However you > can see that the [ServiceTimePrice] array is properly nested in the > [ServiceTime] array. > > Is there a predefined way to nest the [ServiceTime] array into the > [ServiceDay] array, so that on all findall queries i can have a > logically structured data model array? Thank you in advance -b --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
