So i ll try to explain better my problem...
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="org.eu.legalservice.wtold.bo.Panel"
table="PANEL"
schema="WTOLD"
>
<id
name="id"
type="java.lang.Integer"
column="ID"
>
<generator class="sequence">
<param name="sequence">WTOLD.SEQ</param>
</generator>
</id>
<property
name="shortname"
type="java.lang.String"
column="SHORTNAME"
not-null="true"
length="20"
/>
<property
name="fullname"
type="java.lang.String"
column="FULLNAME"
not-null="true"
length="60"
/>
<property
name="dateestablished"
type="java.sql.Date"
column="DATEESTABLISHED"
length="7"
/>
<!-- Associations -->
<!-- uni-directional one-to-many association to Panelmembership -->
<set
name="panelmemberships"
lazy="true"
cascade="none"
>
<key>
<column name="PANEL_ID" />
</key>
<one-to-many
class="org.eu.legalservice.wtold.bo.Panelmembership"
/>
</set>
</class>
</hibernate-mapping>
this is one of my mapping file...
If I use a java.sql.Date all works fine.
But if I use a util.Date or a TimeStamp, I have a probem in database...
I don't know why but the value of my sequence is formated in another format and for example if the value of select XX_SQ.nextval from dual give 500, the row in database for the index is 1,45487E45.
And I don't know why the index is formatted in depends of my Date format who is not a key and I remove all Oracle constraints on this Date.
I have no exceptions or something else, the row is well in databse but the format of my key is strange, for the Date value is also correct.
Only the
KEY is strange...
For example if I don't give a value for the Date, the format of my key is good too.