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

WIP: Using 'real' joins instead of extra_tables and filters. #1

Closed
wants to merge 3 commits into from

Conversation

pwfff
Copy link

@pwfff pwfff commented Mar 27, 2018

My use case requires an outer join, which isn't possible with the current methods.

This PR is more to open a discussion. I've found at least one bug with my approach, and I did this with less of an understanding of the Query object, and more shotgun debugging.

My main problem right now is that some of the table names aren't properly mapped to aliases. I'll try to generate a minimal test case that triggers it once I track down why it's happening.

@millerdev
Copy link
Contributor

@pwfff thanks taking a shot at this. I had briefly looked into doing conventional joins, but it seemed it would open a whole new can of worms. Django's Query class does a lot of magic when it constructs joins as the query is mutated, and I think at this point there is not good support for customizing them. More on that in this SO answer. Changing the join capabilities of the Query class seemed out of scope for what I was attempting with django-cte.

Having said that, I think this is really important and would love to see better support for customizing joins added to Django.

@millerdev
Copy link
Contributor

django-cte uses real joins as of v1.0.0

@millerdev millerdev closed this May 22, 2018
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.

2 participants