#26379: Document that first filter() chained to a RelatedManager is sticky
-------------------------------------+-------------------------------------
     Reporter:  Balázs Oroszi        |                    Owner:  Annabelle
                                     |  Wiegart
         Type:  Bug                  |                   Status:  assigned
    Component:  Documentation        |                  Version:  1.9
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Annabelle Wiegart):

 I just submitted a PR: https://github.com/django/django/pull/20085,
 looking forward to some feedback.

 I tried to explain the sticky filter behaviour without getting into too
 much SQL details. I was hesitant whether to include some sort of
 justification for the unexpected behaviour - like, if we want strict
 filter behaviour to be available in other places like one-to-many
 relationships (and we do), this is the trade-off. Something like "this is
 currently a limitation of the ORM". For the moment, I decided against
 including such a statement in order not to confuse people who are just
 checking documentation in order to get the desired queryset. Not everyone
 needs to understand the details of what is going on behind the scenes.

 That being said, let me know if you think more explanation is needed.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/26379#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 visit 
https://groups.google.com/d/msgid/django-updates/0107019a78b6a90a-cc41edfe-2c01-45a8-be9c-8577d7b27ae7-000000%40eu-central-1.amazonses.com.

Reply via email to