Revert "Making Model::setSource() eager again to fix issues where joined models"

This reverts commit d20f68c44e.
This commit is contained in:
José Lorenzo Rodríguez 2011-02-22 23:49:02 -04:30
parent 6426b7ec04
commit a79877d11a

View file

@ -465,14 +465,16 @@ class Model extends Object {
$this->Behaviors = new BehaviorCollection();
if ($this->useTable !== false) {
if ($this->useTable === null) {
$this->useTable = Inflector::tableize($this->name);
}
$this->setSource($this->useTable);
if ($this->displayField == null) {
unset($this->displayField);
}
$this->table = $this->useTable;
$this->tableToModel[$this->table] = $this->alias;
} elseif ($this->table === false) {
$this->table = Inflector::tableize($this->name);
}