#2361: QuerySet.filter(m2mfield__isnull=False) may return duplicates
-------------------------------------+-------------------------------------
     Reporter:  daniel.tietze@…      |                    Owner:  Norbert
                                     |  Stüken
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Norbert Stüken):

 Thanks for the quick replies!

 I like your example namings, very clear (could be used for example
 namings):
 - Example 1: `filter(A).filter(B) vs filter(A, B)`
 - Example 2: `filter(m2m__isnull)`

 I think, both examples are placed correctly under the respective headings
 and would possibly be missed if put below the other section:
 - **Making Queries** > **Retrieving objects** > **Lookups that span
 relationships** > **Spanning multi-valued relationships** --> Note with
 example 1 for possible duplicates when using multiple filters
 - **Making Queries** > **Related objects** > **Many-to-many
 relationships** --> Note with example 2 for possible duplicates when using
 `isnull` in a filter

 So if the examples address different causes for duplicate entries in m2m
 relationships, I would prefer to link the examples to each other.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/2361#comment:20>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018414abd476-70650a29-ef32-4ad2-b9f0-3ca8a740f40d-000000%40eu-central-1.amazonses.com.

Reply via email to