Skip to content

Commit

Permalink
Fix: For Mjoin apply the main JOIN before any left joins
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Feb 10, 2025
1 parent 23175a7 commit 3303b4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Editor/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,6 @@ public function data($editor, &$data)
$stmt->order($this->order());
}

$stmt->left_join($this->_leftJoin);
$this->_apply_where($stmt);

if (isset($this->_join['table'])) {
// Working with a link table
$stmt
Expand All @@ -560,6 +557,9 @@ public function data($editor, &$data)
);
}

$stmt->left_join($this->_leftJoin);
$this->_apply_where($stmt);

// Check that the joining field is available. The joining key can
// come from the Editor instance's primary key, or any other field,
// including a nested value (from a left join). If the instance's
Expand Down

0 comments on commit 3303b4f

Please sign in to comment.