#25787: Add existence checks for related database sets on managers
-------------------------------------+-------------------------------------
     Reporter:  JustusAdam           |                    Owner:
                                     |  andersonresende
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  ManyToMany,          |             Triage Stage:
  contains, in                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by JustusAdam):

 Why can't the QuerySet itself make the decision whether to use
 {{{__iter__}}} or {{{self.filter(..).exists()}}}? It should have the
 necessary knowledge. If it is itself unevaluated using {{{.exists()}}} is
 the more efficient way in any situation and if it is evaluated then the
 choice should depend on the size of the data.

--
Ticket URL: <https://code.djangoproject.com/ticket/25787#comment:5>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.e203e719e47fd7eb5f07e15c686b118e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to