The MultipleHiLoPerTableGenerator always creates a table with the
value_column of type int however the tables used by classes can have an id type other than int. This obviously creates a type mismatch.
Hibernate version:
Hibernate 3.0 rc 1
Mapping documents:
Code:
<id name="id" type="long" column="object_id">
<generator class="org.hibernate.id.MultipleHiLoPerTableGenerator">
<param name="table">sequences</param>
<param name="primary_key_column">sequence_name</param>
<param name="value_column">value</param>
<param name="primary_key_value">acs_object_id_seq</param>
<param name="primary_key_length">100</param>
</generator>
</id>
The generated DDL SQL (SchemaExport(cfg)):Code:
create table foo (
object_id numeric(19,0) not null,
)
create table sequences (
sequence_name varchar(100),
value int
)