Here's the situation: I am trying to marshalling something like the following: <Root> <Node> <A> Text </A> <B> More Text </B> </Node> </Root>
And my mapping looks something like this: <mapping name="Root" class="foo.bar.Root"> <structure name="Node" field="node" usage="optional"> <structure field="AObject" usage="optional"> <value name="A" field="description" /> </structure> <structure field="BObject" usage="optional"> <value name="B" field="description" /> </structure> </structure> </mapping> So if the first time I marshall this object, and both A & B are null It creates <Root><Node/></Root> as expected. But after this has happened when I try to marshall my first example, every OTHER time it creates the document as <Root> <Node> <A> </A> <B> </B> </Node> </Root> And the other time it works as expected: <Root> <Node> <A> Text </A> <B> More Text </B> </Node> </Root> I setup pre-get methods, and serialization methods on both objects and both AObject & BObject descriptions were correct in the pre-get but were empty in the serialization methods. If I create a pre-get method for Node and declare new AObject & BObject and set the new objects description to the old objects description then set the old objects to the new ones, no data is ever lost. ex: nodePreGet() { AObject a = new AObject(); a.setDescription(this.aObject.getDescription()); this.aObject = a; ...same for b... } So why would this happen every other time after creating an empty document the first time? ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users