1
0
mirror of https://github.com/django/django.git synced 2025-07-19 17:19:12 +00:00

[1.0.X] Clarified documentation regarding Oracle's treatment of nulls and empty strings. Backport of [9976] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2009-03-05 20:22:54 +00:00
parent 79f53b4f20
commit de442c3ab6
2 changed files with 9 additions and 8 deletions

View File

@ -442,12 +442,13 @@ characters of the truncated name with a repeatable MD5 hash value.
NULL and empty strings NULL and empty strings
---------------------- ----------------------
Django generally prefers to use the empty string ('') rather than NULL, but Django generally prefers to use the empty string ('') rather than
Oracle treats both identically. To get around this, the Oracle backend NULL, but Oracle treats both identically. To get around this, the
coerces the ``null=True`` option on fields that permit the empty string as a Oracle backend coerces the ``null=True`` option on fields that have
value. When fetching from the database, it is assumed that a NULL value in the empty string as a possible value. When fetching from the database,
one of these fields really means the empty string, and the data is silently it is assumed that a NULL value in one of these fields really means
converted to reflect this assumption. the empty string, and the data is silently converted to reflect this
assumption.
``TextField`` limitations ``TextField`` limitations
------------------------- -------------------------

View File

@ -54,8 +54,8 @@ string, not ``NULL``.
.. note:: .. note::
When using the Oracle database backend, the ``null=True`` option will be When using the Oracle database backend, the ``null=True`` option will be
coerced for string-based fields that can blank, and the value ``NULL`` will coerced for string-based fields that have the empty string as a possible
be stored to denote the empty string. value, and the value ``NULL`` will be stored to denote the empty string.
``blank`` ``blank``
--------- ---------