#18375: F() doesn't work as expected across multijoin relations -------------------------------------+------------------------------------- Reporter: FunkyBob | Owner: akaariai Type: Bug | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Release blocker | 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): After some thought the backwards compatibility hack is now gone. If somebody complains about the change behavior then lets consider adding it. So, the change is this: when previously a query like {{{ qs.filter(revfk__somecol=F('revfk__somecol2')) }}} would have generated two separate joins for the reverse relation, and this: {{{ qs.filter(revfk__somecol__contains='foo', revfk__somecol=F('revfk__somecol2')) }}} would have generated either 1 or 2 joins depending on dict ordering (if in the order above, then 1, if F() first, then 2). Now both queries will generate just one join. This is correct when considering the principle "things under one .filter() call target the same m2m join". -- Ticket URL: <https://code.djangoproject.com/ticket/18375#comment:16> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.