带有时区的休眠时间戳 [英] Hibernate Timestamp with Timezone

查看:28
本文介绍了带有时区的休眠时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 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

这篇关于带有时区的休眠时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆