Object Mapping error #4646
Labels
status: waiting-for-feedback
We need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
Hi Team,
I upgraded springboot to 3. spring-boot-starter-data-mongodb to 3.2.2. jdk to 21. And mongo is 5. So I think there is no problem with compatibility I have some errors.
And I have a java object
PublishedReportPackReport is
ChartCollection is a basic class. it has a child class
TopRevenueContributingItemDTO is
ChartDTO is
LineChartDTO is
Currently, when I use findAllById(), it has an error.
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.math.BigDecimal] for value [Food]
The
Food
is the name field of the LineChartDTO class.TopRevenueContributingItemDTO also has this error.
I think it should be of string type directly, but Mongo wants to map Food to BigDecimal, and the name field is defined as String instead of BigDecimal. Why does this happen?
The text was updated successfully, but these errors were encountered: