Hi Alexander,
Alexander Buchholtz wrote:
> Hi Jörg,
>
> Jörg Schaible <joerg.schaible@...> writes:
>
>>
>> Actually I have no experience with the Hibernate stuff at all, therefore
>> I don't know, if it really can make a difference. However, I'd be
>> wondering.
>>
>> Can you create a version of the classes above without the Hibernate
>> stuff, create an instance and marshal that to XML?
>>
>> How do you initialize the XStream instance?
>>
>> - Jörg
>>
>
> I'll double check without the Hibernate mappings on Monday. But one of the
> benefits of the Hibernate extension is automatic loading of lazy
> collections and attributes. I would rather not miss this, as the above
> code is just a small portion of the data model.
Somehow we have to identify what causes the problem with the ignored
settings.
> I pretty much initialize the xstream following the tutorial:
>
> final XStream xstream = new XStream(new StaxDriver()) {
>
> @Override
> protected MapperWrapper wrapMapper(final MapperWrapper next) {
> return new HibernateMapper(next);
> }
> };
>
> Mapper mapper = xstream.getMapper();
> xstream.registerConverter(new HibernateProxyConverter());
> xstream.registerConverter(new
> HibernatePersistentCollectionConverter(mapper));
> xstream.registerConverter(new HibernatePersistentMapConverter(mapper));
> xstream.registerConverter(new
> HibernatePersistentSortedMapConverter(mapper));
> xstream.registerConverter(new
> HibernatePersistentSortedSetConverter(mapper));
>
> String xml = xstream.toXML(workflowRole);
And where are here now the calls to XStream.omitField or XStream.alias?
> I would appreciate if you or anyone else has some other ideas.
As said, although I have no experience with Hibernate, I cannot real imagine
that the problem is related to Hibernate.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email