开发者

How to define UserType' s name globally in Hibernate?

It's possible to use @TypeDefs annotation to define sh开发者_如何学Pythonort type name for a UserType. But how to define it for entire application?


You can give a basic value type name (see http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#mapping-types-basictypes) to your UserType class, making that class the substitute of the standard class.

For example:

<typedef name="string" 
      class="com.foo.hibernate.userType.NewStringUserType"></typedef>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜