Skip to content

Commit

Permalink
Cleanup from merging master to hibernate3
Browse files Browse the repository at this point in the history
  • Loading branch information
nvoxland committed Nov 14, 2013
1 parent 8f84740 commit 0e52ac8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Any issues can be logged in the [Github issue tracker](https://github.com/liquib

## Hibernate 3 vs. Hibernate 4

The master branch is Hibernate 4 compatible. For Hibernate 3 support, use the hibernate3 branch.
The master branch is Hibernate 3 compatible. For Hibernate 4 support, use the master branch.

Ideally changes should go into the hibernate3 branch and then be merged into master in order to support both Hibernate 3 and 4.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate4</artifactId>
<version>3.2-SNAPSHOT</version>
<artifactId>liquibase-hibernate3</artifactId>
<version>3.1-SNAPSHOT</version>

<name>Liquibase Hibernate Integration</name>
<description>Liquibase extension for hibernate integration including generating changesets based on changed
Expand Down Expand Up @@ -87,7 +87,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.4.Final</version>
<version>3.6.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
Expand All @@ -97,12 +97,12 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.4.Final</version>
<version>3.6.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>4.2.4.Final</version>
<version>3.6.10.Final</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -136,8 +136,8 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-hibernate</artifactId>
<version>1.2.9</version>
<artifactId>spring-hibernate3</artifactId>
<version>2.0.8</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.envers.configuration.AuditConfiguration;
import org.hibernate.event.spi.PostInsertEventListener;
import org.hibernate.event.PostInsertEventListener;

/**
* Database implementation for "ejb3" hibernate configurations.
Expand Down Expand Up @@ -44,12 +44,11 @@ protected Configuration buildConfiguration(HibernateConnection connection) throw
}
}

//I don't see how this is supported in hibernate 4
// for (PostInsertEventListener postInsertEventListener : configuration.getEventListeners().getPostInsertEventListeners()) {
// if (postInsertEventListener instanceof org.hibernate.envers.event.AuditEventListener) {
// AuditConfiguration.getFor(configuration);
// }
// }
for (PostInsertEventListener postInsertEventListener : configuration.getEventListeners().getPostInsertEventListeners()) {
if (postInsertEventListener instanceof org.hibernate.envers.event.AuditEventListener) {
AuditConfiguration.getFor(configuration);
}
}

return configuration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import liquibase.util.StringUtils;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.engine.Mapping;
import org.hibernate.mapping.PrimaryKey;

import java.util.Iterator;
Expand Down

0 comments on commit 0e52ac8

Please sign in to comment.