I'm having problems using Derby with the built-in driver (derby-10.9.1.0) and db in-memory in my JUNIT with Hibernate (hibernate-core-3.6.8.Final).
I use annotations and use hbm2ddl to create my db internal memory.
Everything works, except when I try to use a sequence.
The sequence is created (appears in the log), but when I try to add one entity (hibernate) using the PK associated with this sequence, my code starts an endless loop entry on each line:
Hibernate: values next value for app.SE_FERI
My db is created as:
jdbc:derby:memory:testdb;create=true
I use hbm2ddl inside my code before using the database, for example:
SchemaExport schemaExport = new SchemaExport(config); schemaExport.drop(true, true); schemaExport.create(true, true);
Some help !?
source share