I am attempting to use the hilo generator where the column is a long. Looking at the TableHiLoGenerator class, it appears to me that the generation goes through a step in which it is converted to an int. The particular method is:
TableGenerator.doWorkInCurrentTransaction(Connection conn, String sql)
Within this method, we perform the select query to get the next value, then perform the update to increment the counter. However, we extract the select query resultSet with:
result = rs.getInt(1);
And we update the query with:
ups.setInt( 1, result + 1 );
ups.setInt( 2, result );
If I'm not mistaken, those ...Int() methods are bugs. Instead, these get/set methods should be delegated to the IdentifierGeneratorFactory class (which has a get method but would need a set).
Working with the rc2 release.
|