| Author |
Problem with Hibernate generator increment
|
markus lehrhuber
Greenhorn
Joined: Jul 06, 2007
Posts: 6
|
|
Hi, i have a problem with using the hibernate generator increment for a pk generation. the code of the *.hbm.xml looks like this and in the pojo the passowordId is defined as Long also the getters and setters are defined right. The attribute in the oracle db is defined as Number(11); If a new row is inserted in the database a very long number is inserted which is not the next value to those which are already stored in the DB. On debugging the code, the value which is set in the pojo by hibernate is the right one which is not corresponding to the value set in database. Whats going wrong?? Thanks for any help!
|
 |
markus lehrhuber
Greenhorn
Joined: Jul 06, 2007
Posts: 6
|
|
This behaviour is detectable on all generators although the log says that the right value is assigned to the parameter:
2007-07-26 14:43:45,796 DEBUG [org.hibernate.type.LongType] binding '321' to parameter: 1
a number like 100000000000000345 is written to the database. I am using hibernate3 (3.2.4.sp1) on JBOSS.
|
 |
 |
|
|
subject: Problem with Hibernate generator increment
|
|
|