Quote:
Hi, fellas!
I have a bean that I want to be a persistent object. This bean have two properties of type java.util.Date. In the respective mapping, I wrote the following:
Code:
<property name="beginning" type="date" not-null="true">
<column name="beginning" sql-type="datetime" not-null="true"/>
</property>
<property name="ending" type="date" not-null="true">
<column name="ending" sql-type="datetime" not-null="true"/>
</property>
Quote:
I want that information about the time of the day in those Date fields be saved persistently, too. But, apparently, it's not. I'm using MySql database (version 4.0.18) to store data.
When I check the data saved when I save one of my objects with the "beginning" field set to, say, 2004/1/1 13:00:00 and the "ending" field set to, say, 2004/1/1 14:00:00, the database has the values 2004/1/1 00:00:00 and 2004/1/1 00:00:00, respectively.
How can I solve this problem?
Thanks.