DbObject: exists should return false...

...in case there is no related uuid

refs #2434
This commit is contained in:
Thomas Gelf 2021-12-23 10:30:20 +01:00
parent 1cbb033911
commit 2e01e181aa

View File

@ -1375,10 +1375,13 @@ abstract class DbObject
$table = $obj->getTableName();
assert($connection instanceof Db);
$uuid = UuidLookup::findUuidForKey($id, $table, $connection, self::$dbObjectStore->getBranch());
if ($uuid) {
return self::$dbObjectStore->exists($table, $uuid);
}
return false;
}
$obj->setConnection($connection)->setKey($id);
return $obj->existsInDb();
}