0

Is there a way to import oracle defined object type in 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.

2

1 Answer 1

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#CBBDCAHG

If you are mapped a table of the type, and the type has no nested types, then it will just look like a normal relational table, and you can just map in like a normal relational table.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.