{{{
qs1 = object.comments.values_list('author__email', flat=True)
qs2 = object.group.members('email', flat=True)
recipients = qs1 & qs2
}}}
Where author and members are both User objects. This tells me the fields
must match to do a combine. If I override the field by doing something
hacky like qs1.fields=['email'] it tells me the base classes must match to
do a combine.
--
Ticket URL: <https://code.djangoproject.com/ticket/24047>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => Database layer (models, ORM)
* needs_tests: => 0
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
I am not sure if this can be made to work easily, but if not we could
document the limitation.
--
Ticket URL: <https://code.djangoproject.com/ticket/24047#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
I think this should be ''wontfix''ed now that the ORM has support for
`QuerySet.intersection` and friends.
Adding multi-models support to queryset combinations would require massive
changes to the internals of `QuerySet` and `Query` objects.
--
Ticket URL: <https://code.djangoproject.com/ticket/24047#comment:2>