Convertig old-style find call to new api

This commit is contained in:
José Lorenzo Rodríguez 2009-11-11 23:43:37 -04:30
parent 00c0bb4d62
commit f7a113d2b0

View file

@ -1121,7 +1121,8 @@ class Model extends Overloadable {
} else {
$recursive = $this->recursive;
}
if ($data = $this->find($conditions, $name, $order, $recursive)) {
$fields = $name;
if ($data = $this->find('first',compact('conditions','fields','order','recursive'))) {
if (strpos($name, '.') === false) {
if (isset($data[$this->alias][$name])) {
return $data[$this->alias][$name];