-->
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: Same column as foreign key of multiple table
PostPosted: Fri Nov 26, 2010 7:20 am 
Newbie

Joined: Fri Nov 26, 2010 7:12 am
Posts: 1
hi,

Might be an old topic, but could not find a solution for the same. Have one column which is a foreign key of two table of which one is self referenced. It works fine when I remove not-null="true" & update = "false" with the downside that it first inserts & then update which is how it should work.

But the other problem is that the foreign key column is an index column & hence throws a unique exception as first parent id is null?

I have not kept many-to-one relationship as is is not there in the object structure.

Is there a way to resolve this? Some pointers to the problem would be great.

Thanks
Vishal


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.