| Author |
Message |
|
2008/01/25 01:15
|
|
|
jvence
Joined: 2005/09/15
Messages: 17
Offline
|
|
|
|
It seems that the 'long' data type has disappeared. If I try to create an entity (in an ER diagram), I cannot define a key as 'long'. I basically want to create a key 'id' with a increment ID Generator.
My choice is a 'bigint' which does not work because hibernate throws a "org.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short or string" when trying to persist this object. I do not want to use a standard integer because I need a long to support millions of records.
What is the logic behing removing the 'long' data type?
|
|
|
|
 |
| |
|
2008/01/25 18:41
|
|
|
admin
Joined: 2005/04/29
Messages: 27
Offline
|
|
|
|
Hello jvence,
May I know what database you are using?
Best regards,
Rain Wong
|
|
|
|
 |
| |
|
2008/01/25 21:22
|
|
|
jvence
Joined: 2005/09/15
Messages: 17
Offline
|
|
|
|
Hello jvence,
May I know what database you are using?
Best regards,
Rain Wong
|
MYSQL 5.0.45 - The issue is that DBVA's ER entity does not have an option for specifying a 'long' data type. Do you think it's an database issue.
|
|
|
|
 |
| |
|
2008/01/28 11:34
|
|
|
Rain
Joined: 2005/04/29
Messages: 747
Offline
|
|
|
|
Hello jvence,
The reason why there is no "long" in the db column is because "long" is not a valid type in MySQL (see http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html ). We have tested using "bigint" in ID column and mapped to "long" in class attribute which working fine with incremental id generator. May I know what type you mapped for "bigint" in class model?
Best regards,
Rain Wong
|
|
|
|
 |
| |