Skip to content
Permalink
Browse files

Alter Model::exists() to return false with no table

  • Loading branch information...
tanuck committed Aug 18, 2015
1 parent 2f7cc05 commit fdb41e01bbe9f8dbb96d4d506f7faba5d0b77c23
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Cake/Model/Model.php
  2. +1 −1 lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -2896,7 +2896,7 @@ public function exists($id = null) {
}
if ($this->useTable === false) {
return true;
return false;
}
return (bool)$this->find('count', array(
@@ -2787,7 +2787,7 @@ public function testRecordExists() {
$this->assertFalse($TestModel->exists());
$TestModel->id = 5;
$this->assertTrue($TestModel->exists());
$this->assertFalse($TestModel->exists());
}
/**

0 comments on commit fdb41e0

Please sign in to comment.
You can’t perform that action at this time.