DbObjectStore: treat UUID result for PostgreSQL

fixes #2636
This commit is contained in:
Thomas Gelf 2022-10-13 10:55:51 +02:00
parent 5aca652355
commit deb5b97ea0
2 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,16 @@
Please make sure to always read our [Upgrading](05-Upgrading.md) documentation
before switching to a new version.
v1.10.2 (unreleased)
--------------------
### Fixed issues
* You can find issues and feature requests related to this release on our
[roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/31?closed=1)
### Import and Sync
* FIX: triggering Sync manually produced an error on PostgreSQL (#2636)
v1.10.1
-------

View File

@ -9,6 +9,7 @@ use Icinga\Module\Director\Db\Branch\BranchedObject;
use Icinga\Module\Director\Db\Branch\MergeErrorDeleteMissingObject;
use Icinga\Module\Director\Db\Branch\MergeErrorModificationForMissingObject;
use Icinga\Module\Director\Db\Branch\MergeErrorRecreateOnMerge;
use Icinga\Module\Director\Db\DbUtil;
use Icinga\Module\Director\Objects\IcingaObject;
use Ramsey\Uuid\UuidInterface;
@ -67,6 +68,7 @@ class DbObjectStore
$query = $db->select()->from($tableName)->order($arrayIdx);
$result = [];
foreach ($db->fetchAll($query) as $row) {
$row->uuid = DbUtil::binaryResult($row->uuid);
$result[$row->uuid] = $class::create((array) $row, $this->connection);
$result[$row->uuid]->setBeingLoadedFromDb();
}