[icinga-checkins] icinga.org: icingaweb2/feature/announce-banner-11198: IniRepository: don' t persist the key column as regular column

git at icinga.org git at icinga.org
Fri Oct 28 17:48:30 CEST 2016


Module: icingaweb2
Branch: feature/announce-banner-11198
Commit: 5212b6bab9349b60810217b25dc304f011f9c471
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=5212b6bab9349b60810217b25dc304f011f9c471

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Wed Oct 26 10:27:30 2016 +0200

IniRepository: don't persist the key column as regular column

---

 library/Icinga/Repository/IniRepository.php |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/library/Icinga/Repository/IniRepository.php b/library/Icinga/Repository/IniRepository.php
index 18ae80f..8cc961c 100644
--- a/library/Icinga/Repository/IniRepository.php
+++ b/library/Icinga/Repository/IniRepository.php
@@ -118,6 +118,9 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
                 }
             }
 
+            // This is necessary as the query result set contains the key column.
+            unset($config->$keyColumn);
+
             if ($newSection) {
                 if ($this->ds->hasSection($newSection)) {
                     throw new StatementException(t('Cannot update. Section "%s" does already exist'), $newSection);



More information about the icinga-checkins mailing list