-->
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: Identity error with foreign keys
PostPosted: Mon Jun 19, 2006 5:15 pm 
Newbie

Joined: Mon Jun 19, 2006 5:10 pm
Posts: 1
I'm pretty new to Hibernate and am running into a simple problem:

I have 2 tables user, userattributes. The userattributes table has a foreign key (userid) from the user table. the userid key is specified as a native generator and so is the userattributeid key.

When I create an instance of the DAO and try to invoke the save method on the UserDAO object after propagating the data from my form bean, I am getting the Identity_insert error. It's probably due to the fact that the userattributes object isn't getting the userid from the newly inserted data. Please provide any suggestions.


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.