From deb5b97ea0daf1d18614a7cdb355757e327b0a0d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 13 Oct 2022 10:55:51 +0200 Subject: [PATCH] DbObjectStore: treat UUID result for PostgreSQL fixes #2636 --- doc/82-Changelog.md | 10 ++++++++++ library/Director/Data/Db/DbObjectStore.php | 2 ++ 2 files changed, 12 insertions(+) diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index ee88b540..c13076c1 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -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 ------- diff --git a/library/Director/Data/Db/DbObjectStore.php b/library/Director/Data/Db/DbObjectStore.php index f2445c8c..bc69b5ad 100644 --- a/library/Director/Data/Db/DbObjectStore.php +++ b/library/Director/Data/Db/DbObjectStore.php @@ -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(); }