Support of Hibernate enhanced collections and proxied types and Hibernate's collection proxies from the Envers add-on. To drop the internals of Hibernate when marshalling such objects to XStream, all converters and the mapper have to be registered for the XStream instance:

``

    final XStream xstream = new XStream() {
      protected MapperWrapper wrapMapper(final MapperWrapper next) {
        return new HibernateMapper(next);
      }
    };
    xstream.registerConverter(new HibernateProxyConverter());
    xstream.registerConverter(new HibernatePersistentCollectionConverter(xstream.getMapper()));
    xstream.registerConverter(new HibernatePersistentMapConverter(xstream.getMapper()));
    xstream.registerConverter(new HibernatePersistentSortedMapConverter(xstream.getMapper()));
    xstream.registerConverter(new HibernatePersistentSortedSetConverter(xstream.getMapper()));