My mapping file is shown below.
STRINGCODE is a BIGINT in the database table.
When inserting values greater than 2^31 the value wraps. For example:
2153073601 is writen to the database as -2147483648.
But my configuration on line 20, says " type="
long" By the way, I have bolded it in here just to emphasize it. What am I doing wrong? Or is there a bug in Hibernate.
I will appreciate any insight that I can get!
Thanks!
I am using Hibernate 2.1.1. There are no exceptions thrown when running.
Mapping file:
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="org.somewhere.db.Stringmap"
table="STRINGMAP"
proxy="org.somewhere.db.objectstore.report.Stringmap"
>
<composite-id name="comp_id" class="org.somewhere.db.objectstore.report.StringmapPK">
<key-property
name="stringcode"
column="STRINGCODE"
type="
long"
/>
<!-- bi-directional many-to-one association to Localemap -->
<key-many-to-one
name="localemap"
class="org.somewhere.db.objectstore.report.Localemap"
>
<column name="LOCALEID" />
</key-many-to-one>
</composite-id>
<property
name="stringvalue"
type="java.lang.String"
column="STRINGVALUE"
not-null="true"
length="1024"
/>
<!-- associations -->
</class>
</hibernate-mapping>