Hibernate Timestamp with Timezone(带有时区的休眠时间戳)
问题描述
我是 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
这篇关于带有时区的休眠时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有时区的休眠时间戳


基础教程推荐
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在多列上分布任意行 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01