How to use Hibernate UserTypes in JPA?
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
.
精彩评论