I fix the problem, but i realy don't know if it is good fix.

if (isset($model->{$className}) && is_object($model->{$className})) {
    $data = $model->{$className}->afterFind(array(array($key =>
$results[$i][$key])));
    $results[$i][$key] = $data[0][$key];
} else {
    if(!isset($results[$i][$model->name])) {
        $results[$i][$model->name] = array();
    }
    $results[$i][$model->name] = array_merge($results[$i][$key],
$results[$i][$model->name]);
    unset($results[$i][$key]);
}


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