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
Support nested children in Arel::Nodes::And
#1279
base: main
Are you sure you want to change the base?
Conversation
Arel::Nodes::And
This looks great but do we have test coverage? |
Nope, also I tried to reproduce the issue and couldn't. |
@ciihla thank you for this contribution, is it possible to add a test (that would fail first without your PR) ? |
The test is very specific, maybe it has to do something with combination of multitenancy(
error:
Sorry I dont have much time to elaborate more :( |
Thanks @ciihla, it definitely makes sense to me that a third gem is involved here. If you find time to isolate this to a sample app, it'd be great. Even temporarily removing either of these gems from your application to see if the issue still reproduces and further isolate the culprit would be great. |
f8fb6e2
to
a02daba
Compare
We encountered another use case that this patch seems to fix: querying a scoped association where the association model also has a default scope (multiple conditions). Here is a standalone test that exposes the error, and a copy with the patch applied that executes without error. Here is another example reproducing the failure with a different set of conditions. |
@shannondoah I just ran into this same issue, have you been running this patch in production? |
Fixes #925.
Fixes #1240.