This commit is contained in:
mcndave committed 2026-12-04 10:07:37 -05:00
commit b0e28591ff
1 file changed
+2 -2
+2 -2
View File
@@ -101,8 +101,8 @@ trait JoinBuilderTrait
foreach($this->entityResolver->searchFieldAnnotationList($item, [ Where::class ]) as $condition) {
$field = $this->joinFieldObject($condition->field, $this->entityClass);
# Adding directly
if ( $field->entityClass === $entity ) {
# Adding directly to the join
if ( ($field->entityClass === $entity) || ($field->entityClass !== $this->entityClass) ) {
if ($field->alias === $defaultAlias) {
$field->alias = $this->escapeIdentifier($alias);
}