问题
Oracle allows for the definition of user defined types. Hibernate can map to these types using the org.hibernate.usertype.UserType class. This defines a mapping between a java bean and the Oracle type.
Using straight JPA, how would one do the same thing?
回答1:
You cannot do it with straight JPA. It doesn't have concept of user defined type. For this need you have to use vendor extensions.
来源:https://stackoverflow.com/questions/8823855/jpa-mapping-to-oracle-user-defined-types