| Author |
SQL server Big Decimal small money hibernate question
|
Tony Evans
Ranch Hand
Joined: Jun 29, 2002
Posts: 521
|
|
I have a table which has a column advanced_payment which is sql server small money.
In my java code I have
@Column(name="advanced_payment")
private BigDecimal advancedPayment;
This calls the following hibernateException
Caused by: org.hibernate.HibernateException: Wrong column type in Enterprise.dbo.pws_price_profile for column advanced_payment. Found:
smallmoney, expected: numeric(19,2).
numeric(19,2) is BigDecimal in Oracle. SQL Server maps Big Decimal to small money.
So is this a hibernate problem.
Thanks for any help
|
 |
Tony Evans
Ranch Hand
Joined: Jun 29, 2002
Posts: 521
|
|
|
Fixed I added @Column(name="advanced_payment",columnDefinition="smallmoney")
|
 |
 |
|
|
subject: SQL server Big Decimal small money hibernate question
|
|
|