Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.5
-
None
Description
I've found an issue in current implementation of MongoStore on Document or List mapping type handling.
If your schema contains a field like this :
{ "name": "keywords", "type": { "type": "array", "items": "string"}, "default": null }
If you choose to latter defaults to an empty array instead of null value like this
{ "name": "keywords", "type": { "type": "array", "items": "string"}, "default": [] }
loading old data will fail because of clearDirty method will try to also clear a null object.
persistent.clearDirty();
I implemented and tested a fix which always return a DirtyListWrapper or DirtyMapWrapper instead of previous null value.