带有时区的休眠时间戳

2022-01-13 00:00:00 time timestamp timezone oracle Hibernate

我是 Hibernate 的新手,正在使用 Oracle 10g 数据库.我们的表中有类型为 TIMESTAMP WITH TIMEZONE 的列.Hibernate 似乎并不直接支持这种映射.有没有标准的方法来解决这个问题?

I'm new to Hibernate and am working with an Oracle 10g database. We have columns in our tables that are of type TIMESTAMP WITH TIMEZONE. Hibernate does not seem to support this mapping directly. Is there a standard way to go about this?

推荐答案

在这篇博文中给出了一个存储 java.util.Calendar 和时区信息的 UserType 示例:http://www.joobik.com/2010/12/mapping-dates-and-time-zones-with.html

An example of a UserType storing java.util.Calendar with time zone information is given in this blog post: http://www.joobik.com/2010/12/mapping-dates-and-time-zones-with.html

相关文章