Skip to content

Commit

Permalink
name over right column instead of left for criteria's joins
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeissonnier committed Sep 4, 2023
1 parent 296f9df commit 0e48855
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/Propel/Runtime/ActiveQuery/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,10 @@ public function addJoin($left, $right, ?string $joinType = null)

$join->setJoinType($joinType);

if ($leftTableAlias !== null) {
$this->addJoinObject($join, $leftTableAlias);
}
else {
$this->addJoinObject($join, $leftTableName);
if ($rightTableAlias !== null) {
$this->addJoinObject($join, $rightTableAlias);
} else {
$this->addJoinObject($join, $rightTableName);
}

return $this;
Expand Down Expand Up @@ -1172,11 +1171,10 @@ public function addMultipleJoin(array $conditions, ?string $joinType = null)
$join->setJoinType($joinType);
$join->setJoinCondition($joinCondition);

if ($join->getLeftTableAlias()) {
$this->addJoinObject($join, $join->getLeftTableAlias());
}
else {
$this->addJoinObject($join, $join->getLeftTableName());
if ($join->getRightTableAlias()) {
$this->addJoinObject($join, $join->getRightTableAlias());
} else {
$this->addJoinObject($join, $join->getRightTableName());
}

return $this;
Expand Down

0 comments on commit 0e48855

Please sign in to comment.