Hello, I have the following mapping file:
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.exolab.org/mapping.dtd"> <mapping> <class name="be.dad.test.Logging" auto-complete="true"> <field name="outputs" type="be.dad.test.Output" create-method="createOutput" collection="collection"> </field> <field name="regions" type="be.dad.test.Region" create-method="createRegion" collection="collection"> </field> </class> <class name="be.dad.test.Region" auto-complete="true"> <field name="outputs" type="be.dad.test.Output" collection="collection"> <bind-xml node="attribute" reference="true"/> </field> </class> <class name="be.dad.test.Output" auto-complete="true" identity="name"> <field name="name"> <bind-xml node="element"/> </field> </class> </mapping> It produces the following XML: <?xml version="1.0" encoding="UTF-8"?> <logging> <outputs> <name>name1</name> <type>type1</type> </outputs> <outputs> <name>name2</name> <type>type2</type> </outputs> <outputs> <name>name3</name> <type>type3</type> </outputs> <regions outputs="name1"> <name>reg1</name> </regions> <regions outputs="name2 name3"> <name>reg2</name> </regions> </logging> Is it possible with Castor to re-use the same instance for referenced objects? I mean: is it possible, when unmarshalling, to put in the Region object's Collection the same instance 1st created in the Logging object's Collection? Because, with the actual mapping file & stuff, it re-creates another instance... I hoped the "reference" option would re-use the same instance, and thus making "reference"... Thx for your help! Chris ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
