diff --git a/core/model/DataObject.php b/core/model/DataObject.php index 460acaebd..20f059d04 100755 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -1307,7 +1307,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity // get filter $combinedFilter = "\"$joinField\" = '$id'"; - if($filter) $combinedFilter .= " AND {$filter}"; + if(!empty($filter)) $combinedFilter .= " AND ({$filter})"; return singleton($componentClass)->extendedSQL($combinedFilter, $sort, $limit, $join); }