10x for all the replies.
But none of this helps, its seems that I'm missing something in the configuration of hibernate/spring (I think).
My code looks like this:
HBM file:
Code:
<class name="DateTest" table="DateTest">
<!-- Primary key -->
<id name="id" column="ID" type="long" access="property" unsaved-value="-1">
<generator class="native"/>
</id>
<property name="creationDate" column="CREATION_DATE" access="property" type="date"/>
</class>
Presistent class:
The field is private Date with getter and a Setter in its Parent class.
At first the field was timestamp but changed to date in order to try it that way but still did not work.
And the test code:
Code:
Session session = getSession (); //get the session from Spring framework
DateTest dt = new DateTest ();
dt.setCreationDate (Calendar.getInstance ().getTime ());
session.save (dt);
p.s.
I tried timestamp, date, and calendar it still no hope, Am I missing something?
10x again..
Oded