-->
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: Inserting 1 parent and many child
PostPosted: Thu Jan 10, 2008 9:23 am 
Newbie

Joined: Thu Jan 10, 2008 9:13 am
Posts: 4
Hibernate version: 3.2

Name and version of the database you are using:Oracle 10g

I am having problem which is something like this

I have table Instru_reln with the following columns
ParentId - PK - FK to the Id of the table below
ChildId -PK - FK to the Id of the table below
Reln -PK


I have instr table which has got the following main column
Id -PK
..... other columns

Now I get something like 1 parent and 5 child and the problem is how do I insert all the 6 rows in instr table and 5 rows in Instru_reln table

I think fetch works when you do the find on Instru_reln since I kept cascade=all

Please help

Thanks
Pavithra


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 18, 2008 3:55 pm 
Newbie

Joined: Thu Jan 10, 2008 9:13 am
Posts: 4
All I need to do is to buld a One to many relationship with itself.


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.