mirror of
https://github.com/django/django.git
synced 2025-01-03 06:55:47 +00:00
Fixed #3118 -- Fixed reversed logic in DBAPI regarding handling of empty PKs on save(). Thanks, Makoto Tsuyuki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a0ef6f6915
commit
94edd4b81f
1
AUTHORS
1
AUTHORS
@ -160,6 +160,7 @@ answer newbie questions, and generally made Django that much better:
|
|||||||
Tom Insam
|
Tom Insam
|
||||||
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
||||||
Karen Tracey <graybark@bellsouth.net>
|
Karen Tracey <graybark@bellsouth.net>
|
||||||
|
Makoto Tsuyuki <mtsuyuki@gmail.com>
|
||||||
Amit Upadhyay
|
Amit Upadhyay
|
||||||
Geert Vanderkelen
|
Geert Vanderkelen
|
||||||
Milton Waddams
|
Milton Waddams
|
||||||
|
@ -143,9 +143,9 @@ or ``UPDATE`` SQL statements. Specifically, when you call ``save()``, Django
|
|||||||
follows this algorithm:
|
follows this algorithm:
|
||||||
|
|
||||||
* If the object's primary key attribute is set to a value that evaluates to
|
* If the object's primary key attribute is set to a value that evaluates to
|
||||||
``False`` (such as ``None`` or the empty string), Django executes a
|
``True`` (i.e., a value other than ``None`` or the empty string), Django
|
||||||
``SELECT`` query to determine whether a record with the given primary key
|
executes a ``SELECT`` query to determine whether a record with the given
|
||||||
already exists.
|
primary key already exists.
|
||||||
* If the record with the given primary key does already exist, Django
|
* If the record with the given primary key does already exist, Django
|
||||||
executes an ``UPDATE`` query.
|
executes an ``UPDATE`` query.
|
||||||
* If the object's primary key attribute is *not* set, or if it's set but a
|
* If the object's primary key attribute is *not* set, or if it's set but a
|
||||||
|
Loading…
Reference in New Issue
Block a user