Hi Nate,
The result/s difference is a typo I made here... Also, Im getting
Type without any problem, but when it get found, it is not calling the
afterFind method... Im using recursive 2, if I increment it it will
find more deep (not necesary) inside the model. Im getting exactly what
I would expect, except of course for the deeper afterFind call.
I recently found than in some cases I get a resultset for the object
(array ( array (object) )) and some others only one object
(array(object))... I made a different approach... but still my little
problem didnt get solved.
function afterFind($results) {
foreach($results as $key=>$value) {
if
(is_numeric(implode(array_keys($value[$this->name])))) {
// we have a resultset
foreach($value[$this->name] as
$rs_key=>$rs_value) {
$results[$key][$this->name][$rs_key]['full_name'] =
$rs_value['last_name'] . ', ' .
$rs_value['first_name'];
}
} else {
// we have a single item
$results[$key][$this->name]['full_name'] =
$value[$this->name]['last_name'] . ', ' .
$value[$this->name]['first_name'];
}
}
return $results;
}
One questions... Can i use behaviors for this?... is it functional by
version 1.1.6.3264
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---