我收到以下错误。
列类型错误:accountBalance,expected:numeric(19,2)。
我尝试添加columnDefinition="smallmoney"
但没有工作。
我可以将其更改为整数但阅读此映射后我有点谨慎.. http://jtds.sourceforge.net/typemap.html
任何想法该做什么..我在后端使用MSSQL服务器..
现在将其改为Integer
错误的列类型:accountBalance,expected:int
我当前的注释定义是这样的。
@Column(name = "AccountBalance",columnDefinition="smallmoney", nullable = false, precision = 10)
private BigDecimal accountBalance;
答案 0 :(得分:0)
我所做的是正确的,因为我保留了
,我收到了这个错误hibernate.hbm2ddl.auto = validate //validate the schema, makes no changes to the database.
将此值更改为
hibernate.hbm2ddl.auto = update // update the schema.
一切正常..
但不确定实际原因......