#15200: ManyToManyField combined with "|" leads to trouble
-----------------------------------------+----------------------------------
Reporter: vanschelven | Owner: nobody
Status: closed | Milestone:
Component: Uncategorized | Version: 1.2
Resolution: wontfix | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
-----------------------------------------+----------------------------------
Comment (by vanschelven):
Hmmm... I guess you're talking about the following snippet:
By default, a !QuerySet will not eliminate duplicate rows. In practice,
this is rarely a problem, because simple queries such as
Blog.objects.all() don't introduce the possibility of duplicate result
rows. However, if your query spans multiple tables, it's possible to get
duplicate results when a !QuerySet is evaluated. That's when you'd use
distinct().
IMHO this kind of leakiness is the worst kind (it happens only very
rarely, and may happen intermittently depending on your data). Anyway I'm
letting it rest for now.
--
Ticket URL: <http://code.djangoproject.com/ticket/15200#comment:5>
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.