MLstate/opalang

Dbgen does not properly update variant types

Opened this issue · 0 comments

Using MongoDb, updates on optional fields corrupt the database.

Test case : edited is an optional field of a record type stored in the database, and initially equals {none}. At some point, the field is updated :

/path/to/[..]/edited <- {some: Date.now()}

With the following result, in MongoDb :

 "edited" : {
    "none" : null,
    "some" : ISODate("2014-07-23T11:46:07.579Z")
 }