Describe the Bug
If you query models using a projection and a model does not have a particular field a NullPointerException is thrown:
java.lang.NullPointerException: null
at com.convergencelabs.convergence.server.backend.datastore.domain.model.mapper.DataValueMapper$.oDocumentToDataValue(DataValueMapper.scala:42) ~[classes/:?]
at com.convergencelabs.convergence.server.backend.datastore.domain.model.ModelStore.$anonfun$modelDataQuery$4(ModelStore.scala:282) ~[classes/:?]
at scala.Function$.$anonfun$tupled$1(Function.scala:76) ~[scala-library-2.13.5.jar:?]
at scala.collection.immutable.List.map(List.scala:246) ~[scala-library-2.13.5.jar:?]
at com.convergencelabs.convergence.server.backend.datastore.domain.model.ModelStore.$anonfun$modelDataQuery$3(ModelStore.scala:281) ~[classes/:?]
at scala.collection.immutable.List.map(List.scala:246) ~[scala-library-2.13.5.jar:?]
at com.convergencelabs.convergence.server.backend.datastore.domain.model.ModelStore.$anonfun$modelDataQuery$1(ModelStore.scala:264) ~[classes/:?]
at scala.util.Success.map(Try.scala:262) ~[scala-library-2.13.5.jar:?]
Step To Reproduce
Create a model.
Query the collection for a model with a projection containing field that does not exist.
Expected Behavior
The field should just be omitted.
Versions
Describe the Bug If you query models using a projection and a model does not have a particular field a NullPointerException is thrown:
Step To Reproduce
Expected Behavior The field should just be omitted.