This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes java.sql.SQLData - Oracle object mapping problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLData - Oracle object mapping problem" Watch "java.sql.SQLData - Oracle object mapping problem" New topic
Author

java.sql.SQLData - Oracle object mapping problem

Sidd Kulk
Ranch Hand

Joined: Feb 20, 2007
Posts: 152

Hi guys,

I am using java.sql.SQLData interface to map my java objects to Oracle database types.

For example, I have an object type Person in Oracle DB defined as:


Corresponding Java type is:



This works fine currently and populates Person Objects from database type.

Now, I have a another type and it's corresponding collection as follows:



I have to create a new entry in type PERSON with this collection as follows:



To make this change I have to change my java Person class. I tried adding java.sql.Array parameter but it is not working.

Can you please help here to map the new PERSON Object type to Java type?

Thanks in advance.

--Siddharth
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.sql.SQLData - Oracle object mapping problem
 
Similar Threads
Stored Procedure and Java
Dout in @JoinColumn annotation
One-to-One mapping problem
Error with user defined object datatypes
Passing Nested Type from Java to DB