K-Phoen / rulerz

Powerful implementation of the Specification pattern in PHP
MIT License
872 stars 97 forks source link

Resolves an issue where the auto joiner picks the wrong alias #104

Closed iainmckay closed 6 years ago

iainmckay commented 6 years ago

We ran in to an issue with the auto joiner picking the wrong alias, for example:

(relationshipA.subRelationship.id = ? OR relationshipB.subRelationship.id = ?)

If subRelationship are both backed by the same doctrine entity then the 2nd part (relationshipB.subRelationship) of the clause won't join through relationshipB but will re-use the join from relationshipA.

We modified the auto joiner to simply track the parent alias.

K-Phoen commented 6 years ago

LGTM, thanks for the PR :+1:

Can you rebase it? I'll merge it once it's done.

iainmckay commented 6 years ago

I've rebased it.

K-Phoen commented 6 years ago

Merged, thanks!