summaryrefslogtreecommitdiff
path: root/docs/db-api.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-30 02:29:25 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-11-30 02:29:25 +0000
commita2418176fd22f1e4af0377c70c5b2d8955b71afe (patch)
treef91cd0b732ca1b1d5a91cd2b987846fd258a27e7 /docs/db-api.txt
parent648a3d87a331674b3e566d8e47ea5ae8422437aa (diff)
queryset-refactor: Interpret qs.filter(foo=None) to be the same as qs.filter(foo__isnull=True). Refs #2737.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
-rw-r--r--docs/db-api.txt15
1 files changed, 6 insertions, 9 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt
index 9390cb0905..94ff7c1583 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -1137,7 +1137,12 @@ Examples::
SQL equivalents::
SELECT ... WHERE id = 14;
- SELECT ... WHERE id = NULL;
+ SELECT ... WHERE id IS NULL;
+
+**New in Django development version:** The semantics of ``id__exact=None`` have
+changed in the development version. Previously, it was (intentionally)
+converted to ``WHERE id = NULL`` at the SQL level, which would never match
+anything. It has now been changed to behave the same as ``id__isnull=True``.
iexact
~~~~~~
@@ -1367,14 +1372,6 @@ SQL equivalent::
SELECT ... WHERE pub_date IS NULL;
-.. admonition:: ``__isnull=True`` vs ``__exact=None``
-
- There is an important difference between ``__isnull=True`` and
- ``__exact=None``. ``__exact=None`` will *always* return an empty result
- set, because SQL requires that no value is equal to ``NULL``.
- ``__isnull`` determines if the field is currently holding the value
- of ``NULL`` without performing a comparison.
-
search
~~~~~~