开发者

How to use Hibernate UserTypes in JPA?

开发者 https://www.devze.com 2023-02-17 08:49 出处:网络
Is it possible to use/regi开发者_开发百科ster a Hibernate UserType in a JPA project, where no annotations are used but the persistence mapping is done in a JPA orm.xml file?

Is it possible to use/regi开发者_开发百科ster a Hibernate UserType in a JPA project, where no annotations are used but the persistence mapping is done in a JPA orm.xml file?

Thanks in advance.


One possible solution I can see is to write mappings for the classes with properties of custom type using .hbm.xml syntax and then add them to persistence.xml with <mapping-file> - Hibernate supports it, but I'm not sure how it would play with other classes mapped in orm.xml.

0

精彩评论

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

关注公众号