-->
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: Insert failed on NULL foreign Key
PostPosted: Wed Aug 23, 2006 7:55 pm 
Newbie

Joined: Wed Aug 23, 2006 7:49 pm
Posts: 1
Location: Chicago
Hi,

I have a user table which has composite primary key. I have a requestlog table which has a nullable foreign key which refers to the user tables' composite primary key.

What property do I need to set in the requestlog hibernate xml definition for inserts to allow null foreign key.

Right now I have the association as described below and my inserts are failing with "integrity constraint (XXXX) violated - parent key not found".

<many-to-one name="customerUser" class="CustomerUser" not-found="ignore" not-null="fasle">
<column name="REQL_CUST_ID" precision="18" scale="0"/>
<column name="REQL_USER_ID" precision="18" scale="0"/>
</many-to-one>

Please help.

Thanks,
Sushil


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.