mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Alter model exists to consider useTable
This commit is contained in:
parent
979820b884
commit
90a77f6ce5
1 changed files with 4 additions and 0 deletions
|
@ -2895,6 +2895,10 @@ class Model extends Object implements CakeEventListener {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->useTable === false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (bool)$this->find('count', array(
|
||||
'conditions' => array(
|
||||
$this->alias . '.' . $this->primaryKey => $id
|
||||
|
|
Loading…
Add table
Reference in a new issue