mirror of https://github.com/django/django.git
Clarified documentation regarding Oracle's treatment of nulls and empty strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7197a4dcb7
commit
ad6ce1e6f9
|
@ -475,12 +475,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
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -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``
|
||||||
---------
|
---------
|
||||||
|
|
Loading…
Reference in New Issue