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
|