-->
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: Before Inserting child record , its' parent class select
PostPosted: Wed Jul 21, 2010 11:43 pm 
Newbie

Joined: Wed Jul 21, 2010 11:34 pm
Posts: 1
I am new to hibernate and i am using Hibernate Annotation. I have the following tables

LOOKUP_A
CDE_A

PARENT_CLASS
PARENT_ID

CHILD_CLASS
CHILD_ID
PARENT_NUM foreig key to PARENT_CLASS
CDE_A foreign key to -- LOOKUP-A

my problems is I am inserting a recond into PARENT_CLASS table and the same time it will insert child record based on parent id. It is inserting proper. But the problem is when child record is going to insert , it is calling select query on LOOKUP_A table and after that it is call INSERT statement on CHILD_CLASS. I don't want to SELECT statement before INSERTING a record into child table.
Please help me.


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.