-->
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.  [ 3 posts ] 
Author Message
 Post subject: id change problem
PostPosted: Fri Dec 02, 2005 9:27 am 
Hello

i got this simple problem using nhibernate.
I want to chang the id( primary key of the) object
and update it, to change this key.
i me getting nhibernate exception like this:
identifier of an instance of {0} altered from {1} ({2}) to {3} ({4}) // in
place of number, there are values and their types.

can anyone help me?

best regards

roman


Top
  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 11:32 am 
Senior
Senior

Joined: Wed Jun 15, 2005 4:17 am
Posts: 156
I can't really imagine why you would like to change the id of an object! If the id is also an id in the business domain, you should define a pure fabricated id which remains unique throughout the db lifetime and define your business domain id as a column with a unique constraint and map it as a read/write property of your object.

cheers,
Radu


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 2:32 pm 
yes, thanks, i thought about it.
probably i will do it this way
regards
roman


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.