Skip to content

Commit

Permalink
Allow direct access to initJoins (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
thybag authored Oct 28, 2021
1 parent 0382ed4 commit 890fd9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Relations/HasManyViaMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function getResults()
* Handle predefined joins array
* @return void
*/
protected function initJoins()
public function initJoins()
{
// Store existing joins and clear list
$joins = !empty($this->query->getQuery()->joins) ? $this->query->getQuery()->joins : [];
Expand All @@ -243,6 +243,8 @@ protected function initJoins()

// Re-add existing joins to the end (we need to ensure relation joins run first)
$this->query->getQuery()->joins = array_merge($this->query->getQuery()->joins, $joins);

return $this;
}

/**
Expand Down

0 comments on commit 890fd9c

Please sign in to comment.