-->
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: ID size
PostPosted: Mon Jan 31, 2011 12:07 am 
Newbie

Joined: Sun Nov 01, 2009 9:24 pm
Posts: 12
hey,

i am trying to configure the hbm class

Code:
<hibernate-mapping package="com.dynwar.transaction">
    <class name="com.dynwar.transaction.actions.TransactionBean" table="transactions">
        <id column="transactionID" name="transactionID">
            <generator class="identity"/>

        </id>
        <property column="transactionType" name="transactionType" not-null="true"/>
        <property column="transactionAmount" name="transactionAmount"/>
        <property column="transactionDate" name="transactionDate" type="date"/>
        <many-to-one name="users" column="username" not-null="true"/>
    </class>
</hibernate-mapping>


how can i set the transactionID to be of a certain size ( let's say 6 or 8 digits once generated)
is there a way to the generator to a specific size?


Top
 Profile  
 
 Post subject: Re: ID size
PostPosted: Mon Jan 31, 2011 5:16 am 
Regular
Regular

Joined: Fri Jan 28, 2011 11:44 am
Posts: 117
Have you tried setting the generator to "assigned" and generating the ID yourself??


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.