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

Support for Hibernate6 collection #346

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

luczus
Copy link

@luczus luczus commented Sep 15, 2023

In this merge request (MR), I would like to introduce support for Hibernate 6 collections. In Hibernate 6, the collection classes were moved to the new package: org.hibernate.collection.spi.*.

This MR makes the following changes:
Updates the imports for the collection classes to the new package.

Thank you for your consideration.

@rani111agrawal
Copy link

rani111agrawal commented Nov 18, 2024

Hi @luczus
Could you please share the steps to build this jar on our local development environment? I am currently unable to build the jar on my setup. Alternatively, if possible, could you share the jar with the applied changes?

cc @joehni

@luczus
Copy link
Author

luczus commented Nov 19, 2024

HHi @rani111agrawal ,

I have not built the new version of the XStream library. I've applied the patch manually..


public class MyXStream extends XStream {

  public MyXStream() {
        super();
        this.registerConverter(new HibernateProxyConverter());
        this.registerConverter(new Hibernate6PersistentCollectionConverter(getMapper()));
        this.registerConverter(new Hibernate6PersistentMapConverter(getMapper()));
    }

    @Override
    protected MapperWrapper wrapMapper(final MapperWrapper next) {
        return new Hibernate6Mapper(next);
    }

    protected void registerConverters() {
        this.registerConverter(new HibernateProxyConverter());
        this.registerConverter(new Hibernate6PersistentCollectionConverter(getMapper()));
        this.registerConverter(new Hibernate6PersistentMapConverter(getMapper()));
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants