QueryMapper
with annotations and does not properly applies PropertyValueConverter
#4510
Labels
Milestone
Introduced a
@LocalDateAsString
annotation used on selectedLocalDate
fields to have them mapped to string in mongo.And a
LocalDateToStringPropertyConverter
which simply converts to/from String/LocalDate.Everything is fine with mapping and simple queries but with eg "range" queries the
QueryMapper
calls the converter with a bsonDocument
which obviously fails with aClassCastException
.The annotation/converter implementations are trivial, code can be found on GitHub.
When a query like below is executed targeting a field that has aforementioned annotation:
an exception is thrown in
QueryMapper
since it tries to invoke the converter with the bsonDocument
representing thegte
andlte
expressions:Complete simple setup can be found at GitHub.
The text was updated successfully, but these errors were encountered: