summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2013-02-24 06:31:14 -0800
committerFlorian Apolloner <florian@apolloner.eu>2013-02-24 06:31:14 -0800
commit4506ae0497d388f8bc118b9f6f916a5da48d599a (patch)
tree762cb3e272661757715dfeab4aa54a98f30426e5 /docs
parentbc787f6a3222c2d425d96dea57a1516b31677bf5 (diff)
parent278dad5b411e3e2ba8b428f7761882424353dea7 (diff)
Merge pull request #717 from slurms/ticket_19746
Fixed #19746 -- Allow deserialization of pk-less data
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/serialization.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt
index 25884fa874..82cb3ffe5b 100644
--- a/docs/topics/serialization.txt
+++ b/docs/topics/serialization.txt
@@ -117,6 +117,16 @@ object and any associated relationship data.
Calling ``DeserializedObject.save()`` saves the object to the database.
+.. note::
+
+ If the ``pk`` attribute in the serialized data doesn't exist or is
+ null, a new instance will be saved to the database.
+
+.. versionchanged:: 1.6
+
+In previous versions of Django, the ``pk`` attribute had to be present
+on the serialized data or a ``DeserializationError`` would be raised.
+
This ensures that deserializing is a non-destructive operation even if the
data in your serialized representation doesn't match what's currently in the
database. Usually, working with these ``DeserializedObject`` instances looks