From c8e8a39f5a08de37cb1e51fa88336c90d804adfc Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 29 May 2015 11:58:21 +0200 Subject: [PATCH] DbRepository: Relax check in providesValueConversion() Would otherwise conflict when tables are joined in. refs #8826 --- library/Icinga/Repository/DbRepository.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Repository/DbRepository.php b/library/Icinga/Repository/DbRepository.php index 6c7a7b22b..e2ba7d994 100644 --- a/library/Icinga/Repository/DbRepository.php +++ b/library/Icinga/Repository/DbRepository.php @@ -402,15 +402,19 @@ abstract class DbRepository extends Repository implements Extensible, Updatable, } /** - * Return whether this repository is capable of converting values for the given table + * Return whether this repository is capable of converting values + * + * This does not check whether any conversion for the given table is available, as it may be possible + * that columns from another table where joined in which would otherwise not being converted. * * @param array|string $table * * @return bool */ - public function providesValueConversion($table) + public function providesValueConversion($_) { - return parent::providesValueConversion($this->removeTablePrefix($this->clearTableAlias($table))); + $conversionRules = $this->getConversionRules(); + return !empty($conversionRules); } /**