Hi All,
I am new to hibernate and understand the concepts. I am trying, however, to figure out how to map an Oracle table that has a nested table. I also have nested tables that contain a VArray or another nested table. Any assistance that you could provide would be great. Here is an example:
Suppose I have the following user master example,
create type ROLE_TY as object (
roleId NUMBER,
active SMALLINT);
create type ROLE_NT as table of ROLE_TY;
create table UserMaster (
userId NUMBER,
login VARCHAR2(25),
lastName VARCHAR2(25),
firstName VARCHAR2(25),
roleList ROLE_NT)
nested table roleList store as ROLELIST_TAB;
The POJOs that I would map to would be something like:
class UserMaster {
private long userId;
private String login;
private String lastName;
private String FirstName;
private List roleList = new ArrayList();
...... }
class Role {
private long roleId;
private short active;
..... }
Any assistance in creating a mapping file would be greatly appreciated. It appears as though Hibernate will do the job, but I just can't quite figure it out. I've looked through Hibernate in Action and the web, and I can't seem to find any reference to Oracle nested tables.
Thanks for your help....
Tom
|