FIX ManyMany link table joined with LEFT JOIN

This commit is contained in:
Daniel Hensby 2017-11-15 17:34:41 +00:00
parent 4f3deb13e0
commit ce3fd370fb
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -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,