-->
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.  [ 1 post ] 
Author Message
 Post subject: parent having one to many with collection in child
PostPosted: Wed Nov 30, 2005 10:43 am 
Newbie

Joined: Wed Nov 30, 2005 10:36 am
Posts: 1
I have run into a issue moving from our existing DOA to hibernate. I have the follow scenario
Class parent {
int parentId
Child childInstance;
}

Class child {
Vector childCollection;
}

The child class is kind of a wrapper for the childCollection. There isn't a table for Child but for childCollection which would be like
create table ChildCollection (autoId int primary key, parentId int foreign key, childValue varchar)

Any idea how the hbm will look like? I have done it where parent class and child class had a one to many relation. but in this case it is the collection within the child. Thanks in advance for your suggestions.


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

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.