Skip to content

Commit

Permalink
Merge pull request #7079 from bryceray1121/forceRelationQueryWithNoSc…
Browse files Browse the repository at this point in the history
…opes

[4.2] Ignore parent global scopes when relation grabs its parent's query builder in order to avoid loop
  • Loading branch information
taylorotwell committed Feb 11, 2015
2 parents f6ac5a1 + 680ee6b commit ced28a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Eloquent/Relations/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public function relatedUpdatedAt()
*/
public function wrap($value)
{
return $this->parent->getQuery()->getGrammar()->wrap($value);
return $this->parent->newQueryWithoutScopes()->getQuery()->getGrammar()->wrap($value);
}

/**
Expand Down

0 comments on commit ced28a1

Please sign in to comment.