I've always used this in Hibernate 4.3.x:
Code:
<id name="id" column="MY_COLUMN">
<generator class="sequence">
<param name="sequence">MY_SEQUENCE</param>
</generator>
</id>
I migrated to Hibernate 5, and now the query is not referencing my mapping. Here is the SQL that is always generated no matter what sequence I reference:
Code:
select
hibernate_sequence.nextval
from
dual
Obviously, the result of this is: "The sequence doesn't exist"
The Hibernate 5.0 Migration Guide says:
Quote:
Deprecated org.hibernate.id.SequenceGenerator and its subclasses
Does it have anything to do with this deprecation?