-->
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.  [ 2 posts ] 
Author Message
 Post subject: Don't want tho gernerate Primary key
PostPosted: Wed Sep 15, 2004 9:53 am 
Newbie

Joined: Wed Sep 15, 2004 9:35 am
Posts: 13
Hi,
I have a primary key from type String which is 6 chars long.
in the hibernate hbn.xml files I always have to map the id like this one

Code:
<id name="id" column="ID" type="long">
       <generator class="increment"/>
   </id>


But I don't want to use this, because the ids can't be generated.Can I say hibernate, that it don't have to gernate the ids, because the user will set this manually?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2004 10:21 am 
Newbie

Joined: Thu Jun 24, 2004 2:19 am
Posts: 10
use "assigned"



hibernate doc (5.1.4.5 Assigned Ids)


pascal


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