3 Replies Latest reply on Jan 27, 2009 2:55 AM by Adam Warski

    Patch to use hibernate 3.3.x with envers-3.4.0-snapshot ??

    Erik-Berndt Scheper Newbie

      Hi,

      I've read somewhere in the forum that hibernate 3.3 no longer works with envers-3.4.0 snapshot. However, we're reluctant to use the hibernate-3.4.0-snapshot.

      I was wondering if a fresh build from the 3.3-branch (with the latest fixes in place) should work, or perhaps a simple patch from the 3.3.1.GA version of hibernate-core.

      I've looked into the fisheye repository for both envers and 3.4.0 (in trunk) and the 3.3-branch and it looks like the crucial patch to use envers is http://opensource.atlassian.com/projects/hibernate/browse/HHH-3351

      So I'd like to know
      *will a build from the 3.3-branch work with envers-3.4.0 snapshot?
      *will a 3.3.1.GA core with the changes for HHH-3351 work with envers-3.4.0 snapshot?

        • 1. Re: Patch to use hibernate 3.3.x with envers-3.4.0-snapshot
          Erik-Berndt Scheper Newbie

          I've found that a simple patch of
          org/hibernate/envers/entities/mapper/relation/lazy/AbstractDelegateSessionImplementor.java
          makes all unit tests pass for hibernate 3.3.2-snapshot




          Index: src/main/java/org/hibernate/envers/entities/mapper/relation/lazy/AbstractDelegateSessionImplementor.java
          ===================================================================
          --- src/main/java/org/hibernate/envers/entities/mapper/relation/lazy/AbstractDelegateSessionImplementor.java (revision 15803)
          +++ src/main/java/org/hibernate/envers/entities/mapper/relation/lazy/AbstractDelegateSessionImplementor.java (working copy)
          @@ -40,7 +40,7 @@
          import org.hibernate.Transaction;
          import org.hibernate.collection.PersistentCollection;
          import org.hibernate.engine.EntityKey;
          -import org.hibernate.engine.LoadQueryInfluencers;
          +//import org.hibernate.engine.LoadQueryInfluencers;
          import org.hibernate.engine.PersistenceContext;
          import org.hibernate.engine.QueryParameters;
          import org.hibernate.engine.SessionFactoryImplementor;
          @@ -72,9 +72,9 @@

          // Delegate methods

          - public LoadQueryInfluencers getLoadQueryInfluencers() {
          - return delegate.getLoadQueryInfluencers();
          - }
          +// public LoadQueryInfluencers getLoadQueryInfluencers() {
          +// return delegate.getLoadQueryInfluencers();
          +// }

          public Interceptor getInterceptor() {
          return delegate.getInterceptor();

          • 2. Re: Patch to use hibernate 3.3.x with envers-3.4.0-snapshot
            Adam Warski Master

            Hello,

            Hibernate 3.3 mostly works with Envers-snapshot, except some inheritance types :).

            If you'd like an update in Hibernate, or a branch, please contact the subscription channels, as you mentioned in another post, or try on IRC/Hibernate forums. I don't have unfortunately much time to tackle this now, sorry :)

            --
            Adam

            • 3. Re: Patch to use hibernate 3.3.x with envers-3.4.0-snapshot
              Adam Warski Master

              Hello,

              and yes, that's the issue that causes problems when using Envers-snapshot + Hibernate 3.3

              So either this would have to be applied to Hibernate, or a work-around to Envers (which was present in the 1.0/1.1 versions, but removed when this bug was fixed in Hibernate)

              --
              Adam