#14971: Exclude by annotation works as OR rather than AND ---------------------------------------------------+------------------------ Reporter: orblivion | Owner: nobody Status: closed | Milestone: Component: Database layer (models, ORM) | Version: 1.2 Resolution: duplicate | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by russellm):
* status: new => closed * resolution: => duplicate Comment: I think this is actually a manifestation of #10060 -- a problem with doing deep aggregates over multiple tables. The SQL for the exclude condition is being generated as HAVING NOT x=0 AND NOT y=0. The problem lies in the fact that the deep table structure causes two joins to be created on the Obj table, causing a cross product of results. -- Ticket URL: <http://code.djangoproject.com/ticket/14971#comment:2> Django <http://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-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.