阅读背景:

如何将休眠时间戳映射到MySQL BIGINT?

来源:互联网 

I am using Hibernate 3.x, MySQL 4.1.20 with Java 1.6. I am mapping a Hibernate Timestamp to a MySQL TIMESTAMP. So far so good. The problem is that MySQL stores the TIMESTAMP in seconds and discards the milliseconds and I now need millisecond precision. I figure I can use a BIGINT instead of TIMESTAMP in my table and convert the types in my Java code. I'm trying to figure out if there is a better way of doing this using hibernate, mysql, JDBC or some combination so I can still use date functions in my HSQL and/or SQL queries?I am using Hibernate 3.x, MySQL 4.1.20 with Jav




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: