Giter Site home page Giter Site logo

Comments (6)

joehni avatar joehni commented on September 18, 2024

The Hibernate extension was once brought in as contribution, personally I never used it in a real project. So you may help with patches upgrading the head revision to the latest Hibernate version...

from xstream.

gboersma avatar gboersma commented on September 18, 2024

I took this on, but it is a quick solution that is not ready to be added to Xstream.

This is what I did:

  • Get the latest XStream repo.
  • Switch to v-1.4.x branch.
  • Copied the xstream-hibernate code into my own project.
  • Update my own POM as needed, to reflect what is in the xstream POM.
  • Update references to Hibernate classes in util/Hibernate.java:
    -- PersistentBag = loadHibernateType("org.hibernate.collection.spi.PersistentBag");
    etc.
    EnversList = loadHibernateEnversType("org.hibernate.envers.internal.entities.mapper.relation.lazy.proxy.ListProxy");
    etc.
    I got the correct package + class names from looking at Hibernate 6 source code.

My plan is to implement this using a smarter approach, i.e works with Hibernate 4 or 6 and do proper testing. I hope to get to that soon, but this hack should get you going for now.

from xstream.

gboersma avatar gboersma commented on September 18, 2024

I also want to point out that I could not update the HEAD (1.5.0-SNAPSHOT) version since it would not build for me. I was consistently getting errors with the Lambda test cases, among others. Once HEAD is in a better state, I can add the updates.

from xstream.

joehni avatar joehni commented on September 18, 2024

Just as a side note, master builds for me cleanly using Java 17 including execution of all unit tests. However, for the next two weeks I am offline, so don't expect any response for this time.
BTW: Do you have any numbers about the usage of the different major Hibernate versions? O simply wonder, what XStream 1.5 should support. 3+4 are probably completely out of scope...

from xstream.

gboersma avatar gboersma commented on September 18, 2024

Okay, I can confirm that everything builds and passes tests with Java 17. I think I was using Java 21 instead, which does not build successfully. Please note that OpenJDK 17 is successful, but Oracle JDK 17 is not.

It should be easy to support all major hibernate versions. The code can try for 6 first, and if it fails, fall back to 3/4.

from xstream.

joehni avatar joehni commented on September 18, 2024

Sorry for the delay, I have this on my radar, but I am currently still overloaded...

from xstream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.