-->
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.  [ 3 posts ] 
Author Message
 Post subject: Oracle 10g Nested Tables
PostPosted: Thu Aug 18, 2005 1:04 am 
Newbie

Joined: Sun Jul 31, 2005 8:49 pm
Posts: 7
I am trying to map Oracle nested tables within Hibernate. Instead of using an intermediate relationship table, I am using nested tables in order to keep a more OR model. However, at this point, I am using Jakarta Commons Digester in order to map my result set (in XML) into an bean graph. I would like to go straight from a result set to POJOs without the intermediate step of converting to XML.

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 3:46 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
See oracle JDBC examples for nested tables and try to implement/generate custom hibernate type.


Top
 Profile  
 
 Post subject: How?
PostPosted: Sun Aug 10, 2008 10:18 pm 
Beginner
Beginner

Joined: Thu Jul 06, 2006 11:09 pm
Posts: 25
Isn't Hibernate was made to encapsulate those JDBC custom data type?

To all mods, please elaborate on how to define oracle nested table mappings.

Thanks in advance.

_________________
Don't forget to rate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.