[hibernate-dev] Strange sequence effect with ORM 5

Sanne Grinovero sanne at hibernate.org
Fri Aug 21 11:14:58 EDT 2015


Hi all,
after upgrading Hibernate Search to Hibernate ORM 5.0.0.Final we
noticed a small change in behaviour in sequences.

In a single test we persist two entities of differnent types, Country
and Address, and both types have the id mapped as follows:

   @Id
   @GeneratedValue
   Long id;

Previously, when running on H2, the IDs assigned to these two entities
would be respectively 1 and 1.
When upgrading ORM from 5.0.0.CR3 to 5.0.0.Final, the assigned ids are
now 1 and 2.

Are sequences now being shared by default across unrelated entities?
Is this the new intended default?

Thanks,
Sanne


More information about the hibernate-dev mailing list