Reputation: 370
I want to create a decimal column with precision 20 and scale 3 in a table, What i did is:
create following variable in pojo class
private BigDecimal minimumValue;
In .hbm file i am setting property value as
<property name="minimumValue" type="DECIMAL" precision="20" scale="3"/>
I am getting following error:
org.hibernate.MappingException: Could not determine type for: DECIMAL, at table: TEST_DECIMAL, for columns: [org.hibernate.mapping.Column(minimumValue)]
Any suggestions?
Upvotes: 3
Views: 11114
Reputation: 18423
Remove type="DECIMAL".
The type attribute holds the hibernate mapping type, this mapping types will convert from Java to SQL data type.
In your case you can use type="big_decimal".
Upvotes: 7