-->
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.  [ 4 posts ] 
Author Message
 Post subject: Value of ttribute in the mapping file <generaor class=&qu
PostPosted: Tue Mar 23, 2004 12:30 pm 
Newbie

Joined: Tue Mar 23, 2004 12:21 pm
Posts: 11
Hi All,
I am trying to save an Object's state in to the database. The primary key for this object is a string (varchar2).
My question is -->
what do I use as my primary key generator class in the mapping file i.e
what should be the value of class attribute
<generator class="......."/>
I tried uuid.string and uuid.hex , but my problem with that is hibernate generates its own value for the primary key and inserts the record with that value. And the value of the primary key which is set by the application is lost.
Any inputs/pointers will be greatly appreciated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 12:33 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
"assigned", as per documentation.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 12:40 pm 
Newbie

Joined: Tue Mar 23, 2004 12:21 pm
Posts: 11
Chris,
Thankyou , that worked. I appreciate your help.
Can you please provide me with a link to that document which you are refering to 'cus I looked in the docs before psoting the question here. couldn't fing anything :(

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 12:41 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
http://www.hibernate.org/hib_docs/refer ... 4-assigned

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.