[Simple-support] CyclicStrategy throws CycleException: Invalid reference 'p101.a' found
Brought to you by:
niallg
|
From: Benoît P. <ben...@un...> - 2008-05-02 08:42:40
|
Hi,
I have the following cross-reference situation :
<apples>
<apple id="a1">
<cake ref="c1">
</apple>
</apples>
<cakes>
<cake id="c1">
<apple ref="a1">
</cake>
</cakes>
And I thought that including a CyclicStrategy would do deserialize it
into two objects, each being a member field of the other:
strategy = new CycleStrategy("id", "ref");
serializer = new Persister(strategy);
However,
the first reference (<cake ref="c1">) is not resolved and a
CycleException is thrown.
So it looks like Cycles are only meant to "go backward", not forward ?
thanks,
b.
|