Andy Buckley wrote:
> I've got a problem with using Castor XML and objects which have a
> bidirectional
> relationship to each other via Java references.
...
> The constructed
> Paper does have a correct set of Datasets which I can read out, so something
> is
> working, but none of those Datasets has a valid reference to its parent Paper
> -
> the thing that would work if Paper.addDataset(...) was being called.
Can anyone help on this? (*Lots* of details in the previous mail) I basically
just want to know why my Castor mapping for an XML structure like this:
<paper>
<dataset datasetId="1">...</dataset>
<dataset datasetId="2">...</dataset>
...
</paper>
doesn't seem to call the Paper.setDatasets(...) or Paper.addDataset(...)
methods during unmarshalling? How *is* the paper's collection of datasets
getting populated?
I'm using Castor 1.1 - should be bang up to date. We're also using JDOM to
preprocess the incoming XML, and then using the Castor unmarshaller on the DOM
node exported from JDOM, rather than unmarshalling directly from the file, if
that might make a difference.
Thanks!
Andy
--
Andy Buckley: CEDAR @ IPPP, Durham
Work: www.cedar.ac.uk
www.insectnation.org
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email