-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
JOINs should be grouped #449
Labels
Comments
Hi @bpamiri , I hope you're doing well. I noticed the HABTM issue is still open, and I'd like to take a shot at working on it. Could you please provide any additional guidance or context before I start? Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider an HABTM example of customer - subscription - magazine with default setting for joinType. We need to be able to retrieve customers with no subscriptions and magazines with no subscriptions without having to change the joinType to outer.
Therefore the INNER JOIN needs to be grouped in parentheses before LEFT OUTER JOINing to customer or magazine.
Here's a good explanation:
http://www.bennadel.com/blog/1059-grouping-join-clauses-in-sql.htm
Possible implementation:
The text was updated successfully, but these errors were encountered: