【发布时间】:2013-03-06 16:10:32
【问题描述】:
我正在使用来自 UserType 3.0.0.RC1 的 org.jadira.usertype.dateandtime.joda.PersistentDateTime 类将 JodaTime DateTime 映射到 Hibernate。 The Javadocs 提到我想设置“databaseZone”和“jvmZone”属性,但我在 UserType 文档中找不到任何指示如何执行此操作的内容。我发现this thread 似乎暗示这些是由类似于以下内容的 XML 设置的:
<prop key="jadira.usertype.autoRegisterUserTypes">true</prop>
<prop key="jadira.usertype.databaseZone">jvm</prop>
我尝试将这些添加到我的休眠配置中,但这只是给出了一个错误。有谁知道这个配置需要去哪里?谢谢。
【问题讨论】:
标签: java hibernate jodatime usertype