- Fixed missing comparison in joinbuilder trait whenever a different alias was used for the main on fields
This commit is contained in:
1 parent
1c03860fc4
commit
e68f55d1ea
1 file changed
+2
-2
@@ -101,8 +101,8 @@ trait JoinBuilderTrait
|
|||||||
foreach($this->entityResolver->searchFieldAnnotationList($item, [ Where::class ]) as $condition) {
|
foreach($this->entityResolver->searchFieldAnnotationList($item, [ Where::class ]) as $condition) {
|
||||||
$field = $this->joinFieldObject($condition->field, $this->entityClass);
|
$field = $this->joinFieldObject($condition->field, $this->entityClass);
|
||||||
|
|
||||||
# Adding directly
|
# Adding directly to the join
|
||||||
if ( $field->entityClass === $entity ) {
|
if ( ($field->entityClass === $entity) || ($field->entityClass !== $this->entityClass) ) {
|
||||||
if ($field->alias === $defaultAlias) {
|
if ($field->alias === $defaultAlias) {
|
||||||
$field->alias = $this->escapeIdentifier($alias);
|
$field->alias = $this->escapeIdentifier($alias);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user