Sql server Hibernate:hbm.xml文件中货币类型的映射

Sql server Hibernate:hbm.xml文件中货币类型的映射,sql-server,hibernate,bigdecimal,Sql Server,Hibernate,Bigdecimal,在我的(Microsoft SQL Server)数据库中,我有一个表,其列类型为money。 作为类中的注释,我有: @Column(name = "preis", columnDefinition = "money", nullable=true) private BigDecimal price; 这很有效。但是如何在hbm.xml文件中进行这样的映射呢 <property name = "price" column = "EPreis" type="big_decimal"/&

在我的(Microsoft SQL Server)数据库中,我有一个表,其列类型为money。 作为类中的注释,我有:

@Column(name = "preis", columnDefinition = "money", nullable=true)
private BigDecimal price;
这很有效。但是如何在hbm.xml文件中进行这样的映射呢

 <property name = "price" column = "EPreis" type="big_decimal"/>
尝试在属性定义中添加
sql type=“money”

Schema-validation: wrong column type encountered in column ...
found [money (Types#DECIMAL)], but expecting [numeric(19,2) (Types#NUMERIC)]