mongo-mapper icon indicating copy to clipboard operation
mongo-mapper copied to clipboard

Support for default Value

Open notz opened this issue 8 years ago • 3 comments
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.

notz avatar Oct 03 '17 00:10 notz

Or you can use Integer?

dozd avatar Oct 03 '17 07:10 dozd

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.

notz avatar Oct 03 '17 08:10 notz

Ok I see the point. It should not be large change.

dozd avatar Oct 03 '17 08:10 dozd