diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 18ca886b0..5a0b9330f 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -555,7 +555,8 @@ class Model extends Object { $this->{$name}->primaryKey = $this->hasAndBelongsToMany[$assocKey]['foreignKey']; } } - return $this->{$name}; + + return true; } /** @@ -2813,7 +2814,7 @@ class Model extends Object { * * @return object A DataSource object */ - public function &getDataSource() { + public function getDataSource() { static $configured = false; if (!$configured && $this->useTable !== false) { $configured = true;