#18375: F() doesn't work as expected across multijoin relations
-------------------------------------+-------------------------------------
Reporter: FunkyBob | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
I have verified that dict-randomization will randomize the result of the
query mentioned in comment:3.
I think we have to go with what FunkyBob suggests in comment:2 - add a
"reuse_joins" argument to F() (better name welcome). If we change how F()
is added to query without adding a way to define the join-reuse then we
will be leaving some users in a hard situation: upgrade to 1.5 breaks
their project with no way to fix the breakage.
I suggest we default to "reuse_joins=True", this way every clause under
same .filter() call will target the same joins, unless explicitly asked to
work otherwise.
I will try to write a patch for this.
--
Ticket URL: <https://code.djangoproject.com/ticket/18375#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.