[icinga-checkins] icinga.org: icinga-web/next: Fix grouping in LegacyApi not working

git at icinga.org git at icinga.org
Fri Apr 26 11:30:47 CEST 2013


Module: icinga-web
Branch: next
Commit: 6984575c43af44b53763f8b9e6f741c6a3e3eadd
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=6984575c43af44b53763f8b9e6f741c6a3e3eadd

Author: Jannis Moßhammer <jannis.mosshammer at netways.de>
Date:   Fri Apr 26 11:30:23 2013 +0200

Fix grouping in LegacyApi not working

The Problem here was that disableAutoIdentifierFields must be
triggered to prevent our custom Doctrine implementation from
 adding the primary key (which crashes groupings)

 fixes #3988

---

 .../LegacyLayer/TargetModifierModel.class.php      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
index e958c67..cec1d39 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -1180,6 +1180,8 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
             $table = $o->getConnection()->getTable($this->getTarget());
             $keys = $table->getIdentifierColumnNames();
             $o->addSelect(implode($keys));
+        } else {
+            $o->disableAutoIdentifierFields(true);
         }
 
         foreach($this->additionalSelects as $alias => $select) {





More information about the icinga-checkins mailing list