-->
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: unique key constraint
PostPosted: Wed Apr 13, 2005 1:44 pm 
Beginner
Beginner

Joined: Tue Jan 18, 2005 6:44 pm
Posts: 39
Hi,
I was curious about the unique key constraint for the column attribute in the mapping file. I have a multiple column unique key constraint and a primary key which is sequence generated.
Say I create a new instance for a row with values for the multiple column key to be the same as a preexisting row in the database and I call the saveOrUpdate function on it. In this case it should do an update is what I assumed would happen but I am wrong. Could someone please throw light on what really happens? I noticed that it always generates an insert statement rather than an update.

Jeevak


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.