0

I'd like to use an in-memory db (H2) to preprocess, validate, etc some import-data before persisting it to the "real" production database. Prior to each import I'd like to recreate the H2 schema to have a clean database, as with hibernate.hbm2ddl.auto:"create". Is there any way to call hbm2ddl programatically or how else can I trigger the schema creation?

I'm using Spring Boot 1.3.3 with Hibernate 5.0.5.

Thank you for your help!

Cheers, Maria

maria vill
  • 1,014
  • 1
  • 7
  • 11

1 Answers1

0

in the meantime I've found the following solution and it worked for me: https://github.com/valery-barysok/spring4-hibernate5-stackoverflow-34612019

The solution is explained in Programmatic SchemaExport / SchemaUpdate with Hibernate 5 and Spring 4

Thanks, Maria

Community
  • 1
  • 1
maria vill
  • 1,014
  • 1
  • 7
  • 11