You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (as of 1.8.2) when reading an "undefined" value from mongo, we have this exception :
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.bson.BsonUndefined] to type [java.math.BigDecimal]
at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:313) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:195) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:176) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleRead(MappingMongoConverter.java:822) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
It would be nice to have a way of converting sunch BsonUndefined to null out of the box.
For my own usage, I created this converter factory :
It works, with the small glitch of this warning which I think is not correct for this situation :
WARN o.s.d.m.c.convert.CustomConversions - - Registering converter from class org.bson.BsonUndefined to class java.lang.Object as reading converter although it doesn't convert from a Mongo supported type! You might wanna check you annotation setup at the converter implementation.
Affects: 1.8.4 (Gosling SR4)
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered:
@a-cordier why do you close this issue, this converter support has to be added in spring data mongodb by default right?
I have see your team wrote a custom converter and registered in mongomappingconverter. But that is temporary solution only right?
Sylvain LAURENT opened DATAMONGO-1439 and commented
Currently (as of 1.8.2) when reading an "undefined" value from mongo, we have this exception :
It would be nice to have a way of converting sunch BsonUndefined to null out of the box.
For my own usage, I created this converter factory :
It works, with the small glitch of this warning which I think is not correct for this situation :
Affects: 1.8.4 (Gosling SR4)
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: