2

Im thinking about starting a java project with the idea of separate the domain classes from everything related to the persistence layer. Then, I want to use hibernate or jpa with the xml mappings configuration (in a orm.xml file) and with liquibase to control the database changes.

It would be great to use liquibase-hibernate plugin to generate the db changesets but im not sure if it is possible.

Can someone tell me if it is possible and if it is a good idea?

Thank you very much.

Ariel Kohan
  • 674
  • 4
  • 15

1 Answers1

2

To answer your question:

  1. Yes, it is possible with liquibase-hibernate, check out the project description and wiki.
  2. But I don't think it's a good idea, there might be some issues with it, especially if your database schema will be complex. I'd write liquibase changeSets myself and use hibernate just for schema validation, using this property: spring.jpa.hibernate.ddl-auto=validate.

But your question is too generic to give a direct answer.

htshame
  • 6,599
  • 5
  • 36
  • 56