I have a problem with java giving the following error:
in class: com.app.myApp.ReportDTO, setter method of property: indicator
expected type: java.lang.Double, actual value: java.lang.IntegerInteger
What happens in my criteria when creating a projecitonList , setting a projection as SUM :
projectionList.add(Projections.sum(propertyIndicator), "indicator");
When giving criteria.List();
the error is popped. The strange thing is that when I used the avg function, instead of sum, it worked normally, without error.
From what I saw, the error occurs because my propertyIndicator
is an Integer , and the property "indicator"
is a Double . Can I convert these properties to the sum function?