I'm trying to persist payment amount field as Big Decimal via Spring Data JPA (Hibernate). I have define column like this:
@Column(precision = 19, scale = 3)
but the problem I'm facing is that the the UP strategy is being used when rounding the number while persisting. For example, if i try to persist 0.12345 it will save 0.124.
I need the DOWN rounding strategy in this situation and i don't know how to set this. I can probably set the scale and rounding strategy for my big decimal in constructor/setters but that doesn't seem like good option to me. Is there some annotation or argument which i need to pass to my jpa so it uses the down strategy while rounding?