-->
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: Issues with IdGenerator
PostPosted: Mon Oct 18, 2010 10:41 pm 
Newbie

Joined: Fri Jun 04, 2010 8:57 pm
Posts: 19
I have a few entities in my model which rely on generated Ids. I decided to use TABLE Generation Strategy and provide a common table for generators of all entities. So I put up this code in my mapping file.

Code:
<table-generator name="IdGenerator" table="ID_Generator" allocation-size="50"
                   pk-column-name="Generator_Name" value-column-name="Generator_Value"
                   schema="DonorDB"/>


I am facing two issuses now. Firstly, the value-column defaults to Integer, but infact I have some entities whose primary key is Long.
Secondly, The pk-column defaults to VARCHAR(255). I want to reduce the size of this column, say VARCHAR(50).

Can anyone help me in resolving these two issues.

regards,
Nirvan.


Top
 Profile  
 
 Post subject: Re: Issues with IdGenerator
PostPosted: Tue Oct 19, 2010 8:16 pm 
Newbie

Joined: Fri Jun 04, 2010 8:57 pm
Posts: 19
I am really stuck at this. Hence bouncing this one, hoping that someone might help.

regards,
Nirvan


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.