Alter model exists to consider useTable

This commit is contained in:
James Tancock 2015-08-16 19:06:12 +01:00
parent 979820b884
commit 90a77f6ce5

View file

@ -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