#25298: Forbid QuerySet filtering by a related field that expects a single value
when multiple values are returned
-------------------------------------+-------------------------------------
     Reporter:  timgraham            |                    Owner:  Y3K
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.8
  (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 Y3K):

 It looks like it isn't possible to know beforehand if the subquery will
 return more than one row, therefore the two possibles solutions I got
 while discussing this at #django-dev are:

 *  Remove said feature at all, validating the queryset passed to the
 filter, raising an exception if it **can** return more than one row.
 * Leave the feature as-is and add a warning on the documentation,
 specifying that SQLite lacks of said validation.

 I request more comments / feedback about this please. What should be the
 desired solution here and why.

 Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/25298#comment:7>
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/067.97d4f5cba684f911a8494876107fb0d6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to