summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-08-18 19:19:01 -0400
committerTim Graham <timograham@gmail.com>2015-08-21 11:04:22 -0400
commitd3bc86ec11bb22f06b5e30fac891ef3e43f82a6d (patch)
tree4cb1f46fe3acb5fa1d02ba5266859e2aacfe5fb8
parent6c6eb8a6917a538968201267f943ef581db1c22d (diff)
Fixed #25284 -- Documented removal of implicit QuerySet __in lookups.
-rw-r--r--docs/releases/1.9.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index b3b09abbb5..54323c09f7 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -877,6 +877,22 @@ returned a list, but an iterator is more efficient.
Existing code that depends on ``list`` specific features, such as indexing,
can be ported by converting the iterator into a ``list`` using ``list()``.
+Implicit ``QuerySet`` ``__in`` lookup removed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In earlier versions, queries such as::
+
+ Model.objects.filter(related_id=RelatedModel.objects.all())
+
+would implicitly convert to::
+
+ Model.objects.filter(related_id__in=RelatedModel.objects.all())
+
+resulting in SQL like ``"related_id IN (SELECT id FROM ...)"``.
+
+This implicit ``__in`` no longer happens so the "IN" SQL is now "=", and if the
+subquery returns multiple results, at least some databases will throw an error.
+
Miscellaneous
~~~~~~~~~~~~~