adding the model alias so that there are no issues when the find has a join on it

This commit is contained in:
dogmatic69 2012-02-16 16:22:45 +00:00
parent 5c792aa831
commit 3246cf7c1e

View file

@ -1945,7 +1945,7 @@ class Model extends Object implements CakeEventListener {
return array();
}
$old = $this->find('first', array(
'conditions' => array($this->primaryKey => $this->id),
'conditions' => array($this->alias . '.' . $this->primaryKey => $this->id),
'fields' => array_values($included),
'recursive' => -1
));