Hi Jörg,
Alexander Buchholtz <alexander.buchholtz@...> writes:
>
> >
> > And where are here now the calls to XStream.omitField or XStream.alias?
>
> I'm currently trying to isolate the issue for you to reproduce in a small
> test project.
>
> In my last code snippet I forgot to add the call to omit the Ids
> accidentally (as I have to remove allot of stuff to reduce complexity of the
> code). So here it comes:
>
> private static final Class[] CLASSES_TO_EXCLUDE_ID_FIELD = new Class[] {
> WorkflowRole.class,
> WorkflowRoleNameLocalization.class,
> LocalizationName.class
> };
>
> protected void omitIDFields(final XStream xstream) {
> for (Class clazz : CLASSES_TO_EXCLUDE_ID_FIELD) {
> xstream.omitField(clazz, "id");
> }
> }
>
> and the call to omitIDFields right before toXML call:
>
> ...
> omitIDFields(xstream);
> String xml = xstream.toXML(workflowRole);
> ...
>
> >
> > > 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
> >
>
> I'll send an update once I've isolated a test case, so far no success to
> reproduce in my test project.
>
> Thanks,
> Alexander
>
I just made another round trip when writing a new test and it seems the
culprit must have been somewhere in my code, as I've already fixed the issue
by coincident probably a few days ago. The id fields are omitted properly
now and I can set aliases for the generics as well.
Pretty weird as I didn't change anything serious but just did some
refactoring to restructure code and write unit tests. The methods to omit
fields wasn't even touched at all.
So thank you for your help, I really appreciate it.
Thanks,
Alexander
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email