I am having tremendous difficulty mapping the following sqlserver types:
i have tried all of the following in the column type:
currency
long
short
float
double
big_decimal
All of them fail, complaining that they were looking for columns of a different type than that which they found in the database.
I am using sqlserver 2000 sp4 with jdbc drivers from datadirect. Has anyone had any success mapping to any of the above datatypes?
Here is an example of my .hbm.xml file. I am using hibernate thru the Grails framework.
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="OrderDetail" table="Order Details">
<id name="id" column="OrderID" type="integer" />
<property name="productid" column="ProductID" type="integer"/>
<property name="unitprice" column="UnitPrice" type="big_decimal" />
<property name="qty" column="Quantity" type="short" />
</class>
</hibernate-mapping>
UnitPrice is a money datatype in the schema. The schema being used is the default Northwind db that comes with sql server.