Updated ReferenceField's to optionally store ObjectId strings.
This will become the default in 0.8 (MongoEngine/mongoengine#89)
This commit is contained in:
parent
658b3784ae
commit
4ffa8d0124
10 changed files with 336 additions and 25 deletions
|
|
@ -277,6 +277,9 @@ class Document(BaseDocument):
|
|||
if not ref or isinstance(ref, DBRef):
|
||||
continue
|
||||
|
||||
if not getattr(ref, '_changed_fields', True):
|
||||
continue
|
||||
|
||||
ref_id = "%s,%s" % (ref.__class__.__name__, str(ref._data))
|
||||
if ref and ref_id not in _refs:
|
||||
if warn_cascade:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue