-->
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: Inserting integer foreign key field with no value
PostPosted: Thu Jun 04, 2009 7:03 am 
Newbie

Joined: Thu Jun 04, 2009 6:50 am
Posts: 1
Hi,
Before reply plz understand this situation.

I have one table 'T1' having one integer filed configID as primary key. This table has some existing data in it.
I created one more table T2, in this table I made one integer filed ID as foreign key reference to configID of T1. Now I am dealing with only T2 not T1, I.e. I am inserting field values in T2 columns only not T1 (Since T1 has already some data).

The requirement is when I will insert data into T2, ID filed may be inserted or may not be inserted. Inserting any value from T1 configID is fine but when I am not inserting its throwing error since it has foreign key reference. So how can I insert/update record in T2 without the value of configID?
Thanks in advance. Help will be highly appreciated.
Himansu


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.