-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
Kotlin supports default values, in data classes where a field is non nullable and has a default value then the default value should be used if the database contains nulls
data class Item(val name:String, val category:String = "default") // This data will error { name: "item2", category: null }
A PR has been submitted reporting this issue: https://github.com/mongodb/mongo-java-driver/pull/1260