commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: Betwixt problem on cyclic bean graphs
Date Tue, 30 Aug 2005 07:09:06 GMT
On 8/30/05, Andrew Duckworth <andrew_duckworth@yahoo.com.au> wrote:

> I'm using betwixt 0.7 and in a test case I'm trying to write XML for
> two beans, a parent & a child that refer to each other. This works
> correctly with beanWriter.setWriteEmptyElements(true), but fails with a
> StackOverflowError when beanWriter.setWriteEmptyElements(true). I have also
> tested with the current nightly build and it does the same  thing, is
> this expected behaviour ?

I think, Betwixt can work with cyclic structurs, by using the XML
ID-IDREF mechanism for them. I'm not sure what the default setting is,
but you can try to set

beanWriter.getBindingConfiguration().setMapIDs(true);

which leads to the generation of an id attribute at each written element.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message