liquibase-hibernate integration is not practical

Description

From http://liquibase.org/forum/index.php?topic=43.0

I did a bit of research and finally got it working but even then decided the liquibase-hibernate integration wasn't providing enough value. I'm very hopeful that in the future it will refine some of these issues but for now it's a no go.

Our environment: liquibase, hibernate, oracle, maven

  • The hibernate annotation to liquibase generation is currently only generating the table DDL without the validation or creating the sequences to go with the tables.

  • The generation overwrites the file instead of intelligently appending to an exsisting file so it requires an extra step of copy/paste to the real liquibase file

  • The hibernate/liquibase plugin uses ant. When the ant task configured into maven there's no way to run it independantly of the build phases w/o configuring a profile

  • Maven profiles are not inherited, so they must be copy pasted into every model module and can't be put into pom-model.

  • A hibernate.cfg.xml must exist in the model module for the sole purpose of the liquibase-hibernate conversion
    a changelog file must exist in the model module for the sole purpose of generating the liquibase xml to copy from.

  • The tool will preform a diff against the database, not against an exsisting changelog file so a liquibase/hibernate must connect to that database to compare the hibernate annotations against and then only the difference is put into the changelog file.

Environment

None

Activity

Show:
Nathan Voxland
November 6, 2009, 5:37 PM
Richard Bradley
February 28, 2012, 10:55 AM

re needing a "hibernate.cfg.xml" file – I have added some notes to the docs about how to extract a Configuration from Hibernate when bootstrapping it in EJB/JPA/annotation configuration mode: https://github.com/RichardBradley/liquibase.github.com/commit/d1ac4950df280a140768a8c1421c221203d3c63d

Nathan Voxland
October 8, 2013, 6:08 AM

The liquibase-hibernate integration is greatly improved as of version 3.0 which should be released soon after liquibase 3.0.6

Fixed

Reporter

Nathan Voxland

Affects versions

Priority

Major
Configure