HSQLDB and SequenceGenerator issue

I have an object that has an ID field:

@Id
@Column(name = "`U##ID_VOIE`")
@GeneratedValue(generator = "VOIE_SEQ")
private String id;

      

The class also defines a sequence generator:

@SequenceGenerator(name = "VOIE_SEQ", sequenceName = "VOIE_SEQ")

      

and the Oracle schema has the required sequence. Everything works fine.


We also have benchmarks that use HSQLDB in memory. All tables are created based on Hibernate entity classes before running tests.

However, no table is created for this particular class. And the tooltip appears because ID is a String and the SequenceGenerator in HSQLDB returns INT / LONG / numeric value.

The application is using a legacy Oracle database and the ID_VOIE column should remain as a string / Varchar.

Any solutions?

+2


a source to share


1 answer


Instead of using H2.



0


a source







All Articles