- Fixed missing comparison in joinbuilder trait whenever a different alias was used for the main on fields

This commit is contained in:
Dave Mc Nicoll committed 2026-12-03 20:58:38 +00:00
1 parent 1c03860fc4
commit e68f55d1ea
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);
}