-->
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: one to many parent object deletion
PostPosted: Sun Aug 09, 2009 1:16 pm 
Newbie

Joined: Sun Aug 09, 2009 1:01 pm
Posts: 1
hi

I have made a parent to child relation shio one to many. now i am doig delete insertion on that on a specific condition.

i have deleted the parent object then its child also deletes but after this when new record inseerted ,then autogenerated number not coming properly.


when inserting the record first time

(A)
paren table

id ,name
1 p1


child table


id fk name
1 1 c1
2 1 c2


after deletion of parent and then re-insert ith record it becomes
(b)


id ,name
2 p1


child table


id fk name
2 2 c1
3 2 c2

I want it should be inserted as it was inserting previously(a) from begining




can any one help me in this regard.


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.