Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the creation of snaphots of non-Jdbc based databases #153

Closed
wants to merge 3 commits into from
Closed

Allow the creation of snaphots of non-Jdbc based databases #153

wants to merge 3 commits into from

Conversation

LeovR
Copy link
Contributor

@LeovR LeovR commented Aug 10, 2013

I'd like to create an extension for database diffs with JPA-annotated classes.
Currently most of the subclasses of JdbcSnapshotGenerator heavily depend on the database being an AbstractJdbcDatabase.

I want to create a Database-Class for the JPA-annotated classes which is not a subclass of AbstractJdbcDatabase. But since all subclasses have a priority > 0 they are considered as snapshot generators and then fail with exceptions.

@Vulcannis
Copy link

Just FYI, liquibase-hibernate already supports doing diffs from JPA. You just point it to a persistence.xml instead of a hibernate config file. The official version only supports liquibase 2 and an older version of hibernate though. I've got a version working locally for liquibase 3 and hibernate 4, I'll try to push it up soon.

@LeovR
Copy link
Contributor Author

LeovR commented Sep 3, 2013

I'm aware of the current liquibase-hibernate implementation. But I'm interested in a version which works with liquibase 3 and hibernate 4.
Furthermore, I am not using any persistence.xml but I am using spring's package scanning. Thus, I need an option of providing some packages to be scanned instead of a persistence.xml

@Vulcannis
Copy link

I have no experience with Spring's JPA support, but package scanning works fine with liquibase-hibernate. You do need a persistence.xml file but it's nearly empty, basically a couple properties.

I found it quite difficult to get good metadata from Hibernate though, and some JPA information isn't even available, so a pure JPA solution would be better.

@nvoxland
Copy link
Contributor

Similar code has been already put into 3.0.x now. There is also support just added to liquibase-hibernate to specify a class that returns a hibernate Configuration object when you don't have a hibernate.xml or persistence.xml file. If you are interested/able to doing some testing of the liquibase-hibernate extension to see if it does what you need and expect before it is released that would be great.

@nvoxland nvoxland closed this Sep 27, 2013
nvoxland added a commit that referenced this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants