hibernate diffing - some alternate ideas

From reading here and on jira, it sounds like the current hibernate diff tool is lacking some features (sequence support, user types, etc). It also sounds like it is going to be split out into an extension.

The way I plan to use liquibase + hibernate now is to us hbm2ddl and then use the ddl on a temporary database I create, then run the current changelog on another temp database, then run the normal liquibase diff against those two DB’s. This would, effectively, be comparing the hibernate configuration against the current changelog - just in a rather roundabout way.

I’m probably going to automate this. The only parameters it would new would be a user / password for a database that has permissions to create / drop databases, the location of the hibernate config and the location of the changelog.

It could possibly be done using hsqldb as the staging ground if the changes were not too database specific, although te hibernate configuration would have to be modified to use the hsqldb dialect, you could probably us resource filtering an set those properties up in maven.

It seems that this way would take a lot less time to get to a fully workable solution than it would be to do it the “right way”

Any thoughts? I could craft up a maven mojo to do this process pretty quickly I think.

That would definitely work as a short term solution. If you could create a maven mojo or something similar to automate the process, I think that would help a lot of people out.  It wouldn’t be something we would want to add into the core maven classes, but it would be great as an extension (http://liquibase.org/extensions). 

My plan is to revisit the diff tool in the 2.1 release, including adding in better hibernate diff support.  We use hbm2ddl internally as part of the hibernate diff, so it should just be a matter of reading more of the data from the generated data structures.