-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Newbie - Mapping Oracle nested tables and varrays
PostPosted: Sun Jul 31, 2005 9:07 pm 
Newbie

Joined: Sun Jul 31, 2005 8:49 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 23, 2006 1:56 pm 
Regular
Regular

Joined: Mon Aug 07, 2006 6:22 pm
Posts: 67
This is something that I believe I need, also. Is it possible to map Oracle Varrays into Hibernate, so I can build a query where clause that checks whether a particular value is in the varray?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.