-->
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.  [ 1 post ] 
Author Message
 Post subject: Only int with @TableGenerator?
PostPosted: Mon Nov 27, 2006 8:14 am 
Newbie

Joined: Mon Nov 27, 2006 7:38 am
Posts: 7
Hi,

I use the @TableGenerator annotation with @Id @GeneratedValue to get my primary keys into a table. Something like this:

@TableGenerator(name = "emp", table="keys", pkColumnName="name", pkColumnValue="value")
@Id @GeneratedValue(generator="emp")
private long emp_id;

Now Hibernate creates a table named keys with two columns. The primary key is emp_id and is of type long, but the value column is created with type INTEGER. When emp_id is mapped to the database Hibernate will create it as a BIG INT.

Is this what is supposed to happen? Can @TableGenerator only handle values of type INTEGER? Or am I doing something wrong?

Best Regards,
Skipper


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.