| 1 | Index: db-api.txt
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- db-api.txt (revision 4193)
|
|---|
| 4 | +++ db-api.txt (working copy)
|
|---|
| 5 | @@ -142,10 +142,10 @@
|
|---|
| 6 | or ``UPDATE`` SQL statements. Specifically, when you call ``save()``, Django
|
|---|
| 7 | follows this algorithm:
|
|---|
| 8 |
|
|---|
| 9 | - * If the object's primary key attribute is set to a value that evaluates to
|
|---|
| 10 | - ``False`` (such as ``None`` or the empty string), Django executes a
|
|---|
| 11 | - ``SELECT`` query to determine whether a record with the given primary key
|
|---|
| 12 | - already exists.
|
|---|
| 13 | + * If the object's primary key attribute is set to a value that
|
|---|
| 14 | + evaluates to ``True`` (whatever excluding ``None`` or an empty
|
|---|
| 15 | + string), Django executes a ``SELECT`` query to determine whether a
|
|---|
| 16 | + record with the given primary key already exists.
|
|---|
| 17 | * If the record with the given primary key does already exist, Django
|
|---|
| 18 | executes an ``UPDATE`` query.
|
|---|
| 19 | * If the object's primary key attribute is *not* set, or if it's set but a
|
|---|