mongo-mapper
mongo-mapper copied to clipboard
Support for default Value
trafficstars
Very helpful for updates, if a document has a new int field with default value x. Currently you have to update all document in an manual process before release, otherwise the documents can't be read.
Or you can use Integer?
Yes, but then i always need a null check in the application which is not really nice. I would prefer a default value and no null check. Or at least don't throw a exception on this case -> the object already has a default value.
Ok I see the point. It should not be large change.