oracle-objects

Oracle database object type import in Java

不打扰是莪最后的温柔 提交于 2020-01-25 07:15:24
问题 Is there a way to import oracle defined object type in Java(JPA). I have a complex object defined in database : create or replace TYPE "myType"{ someString varchar2(100), someString2 varchar2(100), constructor....} this object type is than used in a database table. 回答1: There is no standard support for object-types in JPA. If you are using EclipseLink, you can use the @Struct annotation to map object-types, http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_struct.htm