-
Notifications
You must be signed in to change notification settings - Fork 45
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 don't use aliases in subqueries #2
Comments
@pwfff from django.db.models.sql.constants import LOUTER
query = cte.join(Region, name=cte.col.name, _join_type=LOUTER) approximate SQL: SELECT ...
FROM region
LEFT OUTER JOIN cte ON region.name = cte.name Fair warning: this is an undocumented feature, and may change in the future. Also be careful: the join may be automatically changed to an INNER JOIN if you subsequently (after calling If you're satisfied with this I think we can close #1. Let me know what you think. |
It works as well as the version I had, but I'm still running into this issue:
I'll see if I can get a simple reproduction for you. |
Seems to happen when doing something like |
I have an attempt at a fix in #4. |
@pwfff Is this issue resolved now? |
Yes, with #4. Thank you! |
See #1 for a possible solution.
The text was updated successfully, but these errors were encountered: