Dear all, I have a little problem with my mapped Timestamps in Hibernate. I need Timestamps with a milliseconds precision, for which I'm using the DATETIME(6) format on the MySQL Server and java.sql.Timestamp Objects on the Client. My problem is the conversion from the 6 digits milliseconds from the server side to the 9 digits in the Timestamp objects, because hibernate fills the first 3 millisecond-digits from the Timestamp object with zeros and not the last 3 digits. Here is a little example: My MySQL Server has the Timestamp: 2013-11-06 13:09:34.115395. After I load it with Hibernate and I receive: 2013-11-06 13:09:34.000115395.
Can you tell me how to fix this? Like I said before I'm using Datetime(6) to save the Timestamps on the server, and java.sql.Timestamp Objects on the client. I'm using a MySQL 5.6.14 Community Server.
Many Greetings biro
|