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

Fixed #26196 -- Made sure __in lookups use to_field as default. #6111

Closed
wants to merge 1 commit into from

Conversation

charettes
Copy link
Member

Thanks to Trac alias hellpain for the report.

Thanks to Trac alias hellpain for the report.
root_constraint.add(
SubqueryConstraint(
self.lhs.alias, [self.lhs.target.column],
[f.get_attname_column()[1] for f in self.lhs.output_field.get_path_info()[0].target_fields],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akaariai I'm really not sure from where I should retrieve the SubqueryConstraint.targets. I see that self.lhs.sources is available when isinstance(self.lhs, MultiColSource) but in this case self.lhs.sources is an empty list.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to try to work on Django tomorrow. I'll try to work on this.

charettes referenced this pull request Feb 10, 2016
Previously related fields didn't implement get_lookup, instead
related fields were treated specially. This commit removed some of
the special handling. In particular, related fields return Lookup
instances now, too.

Other notable changes in this commit is removal of support for
annotations in names_to_path().
@sergei-iurchenko
Copy link
Contributor

As I see not all django test are passing, so this PR solves one problem and creates another)

@timgraham
Copy link
Member

Updated by Anssi in #6117.

@timgraham timgraham closed this Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants