Skip to content

Commit

Permalink
Merge pull request #1789 from ulcuber/fix-has-realtions-n+1
Browse files Browse the repository at this point in the history
fixed: loadRelated n+1 queries
  • Loading branch information
haringsrob authored Sep 13, 2022
2 parents f34c394 + a7f6974 commit d7c3c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Behaviors/HasRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getRelated($browser_name)
*/
public function loadRelated($browser_name)
{
if (!isset($this->relatedItems)) {
if (!$this->relationLoaded('relatedItems')) {
$this->load('relatedItems');
}

Expand Down

0 comments on commit d7c3c53

Please sign in to comment.