-->
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: Howto create incremental value property
PostPosted: Mon Feb 25, 2008 6:42 am 
Beginner
Beginner

Joined: Thu May 26, 2005 10:22 am
Posts: 20
Hi!
I need to have an incremental attribute in an entity that gets the value from a sequence.
I now this can be applied to the primary key like this (in MySQL):



Code:
<id name="id" type="java.lang.Long">
         <column name="ID">
         </column>
         <generator class="increment"/>
      </id>


But I do not want this property to be a key. I want it to be a property instead.

Can this be done with Hibernate?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 12:23 pm 
Beginner
Beginner

Joined: Thu May 26, 2005 10:22 am
Posts: 20
Any help with this, please?


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.