mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Revert "Making Model::setSource() eager again to fix issues where joined models"
This reverts commit d20f68c44e
.
This commit is contained in:
parent
6426b7ec04
commit
a79877d11a
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue