Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with self joins and includes #1275

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Mar 4, 2022

Our polyamorous monkeypatches were doing too much. Removing our custom equality and letting ActiveRecord figure it out seems to do the trick and fix this.

On some Rails & DB adapters this seems to break a polyamorous spec. However, this spec just tests an implementation detail but it's unclear whether the spec breaking has any actual bad side effect in real like, so I removed it.

Fixes #1271.

Our polyamorous monkeypatches were doing too much. Removing our custom
equality and letting ActiveRecord figure it out seems to do the trick
and fix this.

On some Rails & DB adapters this seems to break a polyamorous spec.
However, this spec just tests an implementation detail but it's unclear
whether the spec breaking has any actual bad side effect in real like,
so I removed it.
@deivid-rodriguez
Copy link
Contributor Author

I investigated a bit where this comes from.

These equality methods and the corresponding spec were correctly removed at #946, to keep up to date with a change in active record. However, they were incorrectly added back at #1113 when polyamorous code was included with ransack. In particular by ca51ed8 and ca51ed8, which suggests that this is a regression only present in Ransack 2.4.0 or newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Joins problem
1 participant