Fixed #30739 -- Fixed exclusion of multi-valued lookup against outer rhs.#11734
Merged
felixxm merged 2 commits intodjango:masterfrom Sep 2, 2019
Merged
Fixed #30739 -- Fixed exclusion of multi-valued lookup against outer rhs.#11734felixxm merged 2 commits intodjango:masterfrom
felixxm merged 2 commits intodjango:masterfrom
Conversation
31a5bfd to
9294a7a
Compare
9294a7a to
5756a1d
Compare
Expressions should never be prepared as other Lookup.get_prep_lookup implementations hint at by returning early on the presence of the resolve_expression attribute. The previous solution was only handling lookups against related fields pointing at AutoFields and would break for foreign keys to other fields. It was also causing bidirectional coupling between model fields and expressions which the method level import of OuterRef was a symptom of.
…rhs. OuterRef right hand sides have to be nested, just like F rhs have to, during the subquery pushdown split_exclude performs to ensure they are resolved against the outer query aliases.
5756a1d to
13a8884
Compare
Member
|
@charettes Thanks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.