DbObject: exists() must check for UUID column

fixes #2475
This commit is contained in:
Thomas Gelf 2022-02-24 16:36:52 +01:00
parent ccd4d694d8
commit ccd6f4266a
2 changed files with 13 additions and 3 deletions

View File

@ -4,9 +4,19 @@
Please make sure to always read our [Upgrading](05-Upgrading.md) documentation
before switching to a new version.
next (will be 1.9.0)
next (will be 1.9.1)
--------------------
### Fixed issues
* You can find issues and feature requests related to this release on our
[roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/28?closed=1)
### User Interface
* FIX: DataList-backed fields failed to validate (#2475)
1.9.0
-----
### Breaking Changes
* Module dependencies have been raised, [Upgrading](05-Upgrading.md) and
[Installation](02-Installation.md) documentations contain related details

View File

@ -1371,7 +1371,7 @@ abstract class DbObject
/** @var DbObject $obj */
$obj = new static;
if (self::$dbObjectStore !== null) {
if (self::$dbObjectStore !== null && $obj->hasUuidColumn()) {
$table = $obj->getTableName();
assert($connection instanceof Db);
$uuid = UuidLookup::findUuidForKey($id, $table, $connection, self::$dbObjectStore->getBranch());
@ -1418,7 +1418,7 @@ abstract class DbObject
$db = $connection->getDbAdapter();
$obj = new static;
if (self::$dbObjectStore !== null) {
if (self::$dbObjectStore !== null && $obj->hasUuidColumn()) {
$table = $obj->getTableName();
assert($connection instanceof Db);
return self::$dbObjectStore->load($table, $uuid);