diff between current changelog and hibernate entities

Hi,

is it possible to generate a diff changelog between the current changelog xml file and my hibernate/jpa entities without first applying the current changelog to a db and diffing that db with liquibase-hibernate?

as liquibase supports URLs of the type hibernate:spring:com.mycompany.model, could it support something like changelog:classpath:com/mycompany/model/changelog.xml.

I don’t know how liquibase works but I suppose it constructs a relational model of its own either based on jdbc metadata or hibernate mappings… so I guess, it could do the same based on changelog files.

Thanks,

Xavier

In theory it could be done, but it isn’t supported yet. The main problem with supporting a changelog “database” is that Liquibase has not SQL parser so if there are any block we aren’t able to track what is happening. Similarly, can keep Liquibase from knowing what is really going on.

It should be able to make it work for a subset of tags, especially. It’s a commonly requested feature, but it hasn’t been implemented yet. 

Nathan

Ok, thanks for the information.

As I am not using any sql in my changelog (I’m only using basic refactoring tags), I suppose a small subset of the supported tags would be enough in my case.

This feature would indeed be a great addition to liquibase. Any idea if and when this could be implemented in the future?

Thanks,

Xavier

It definitely could be done, I just haven’t gotten to it yet. I’m in the middle of a large refactoring of the snapshot logic which will hopefully make it easier to implement as well.

Nathan