Castor supports references via the Source Code Generator and via the mapping file. Due to overhead, references are not supported via introspection. Keeping a copy of every object marshalled and checking it each time an object is marshalled could be expensive. It's not difficult to do and will probably provide a way to do it in the future, but since it could really slow things down for people who don't need it, we'll probably make it configurable and not enabled by default. Thanks, --Keith Max Foxell wrote: > > Not that I know of. I'm no expert on Castor but it seems to me that Castor XML > could use the notion of object identity (as it does with Castor JDO) to identify > duplicate references when marshalling/unmarshalling and avoid making duplicate > copies. If Castor could do this then a lot of verbose and error prone boiler > plate coding could be avoided. Hopefully there are plans to add this feature in a > future release. > > Max > > Drew Davidson wrote: > > > Max Foxell wrote: > > > > > I have the same problem. As far as I'm aware currently the only solution > > > is to patch up the references following unmarshalling. It would be really > > > good though if Castor automated this process to avoid this sort of boiler > > > plate coding in the client code. Perhaps a Castor XML developer could > > > indicate whether this is in their plans? > > > > Is there an API that I don't know about that would allow the objects > > themselves to patch these references while the marshalling is in progress? > > Something like the standard Java serialization mechanism that allows you to > > validate an object after it has been read from the stream would be nice (like > > ObjectInputValidation, for example).. > > > > - Drew > > -- > > Drew Davidson > > Chief Scientist/Director, Research & Development > > OGNL Research Labs > > (520) 531-1966 > > (520) 370-5117 (cell) > > (520) 531-1965 (fax) > > [EMAIL PROTECTED] > > http://www.paintyourselfsilly.com > > http://www.ognl.org > > > > ----------------------------------------------------------- > > If you wish to unsubscribe from this mailing, send mail to > > [EMAIL PROTECTED] with a subject of: > > unsubscribe castor-dev > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
