diff --git a/model/DataQuery.php b/model/DataQuery.php index 9ccb5912b..733576526 100644 --- a/model/DataQuery.php +++ b/model/DataQuery.php @@ -726,7 +726,7 @@ class DataQuery { list($parentClass, $componentClass, $parentField, $componentField, $relationTable) = $component; $parentBaseClass = ClassInfo::baseDataClass($parentClass); $componentBaseClass = ClassInfo::baseDataClass($componentClass); - $this->query->addInnerJoin($relationTable, + $this->query->addLeftJoin($relationTable, "\"$relationTable\".\"$parentField\" = \"$parentBaseClass\".\"ID\""); if (!$this->query->isJoinedTo($componentBaseClass)) { $this->query->addLeftJoin($componentBaseClass,