(Off Topic - either I'm going crazy, or the whole subscription to this list starting at: http://www.castor.org/lists.html and including the confirmation response does not mention the e-mail address of the list).


I'm trying to archive a graph of arbitrary objects. I don't know the types of the object - they can be added by the user as they run the application, so I can't create mappings up front or control the base classes, etc. The objects are held in multiple wrappers and arrays - that is there is a graph of objects, we may cross references. I seem to get lots of copies of the objects and no references.

As a trivial case, I created two Vectors of identical objects. The Vectors are different, but contain the same object references. I created a set/get for each Vector and a mapping for the root object that maps the two fields (and only the two fields). I marshalled the root object. The Vectors are stored, but with copies of the object rather than a reference. Presumably if I unmarshall these the Vectors will now no longer hold identical references, but copies of the objects.

Is there anything that I need to do to force the creation of the references? (Remember that I CANNOT create mappings for the objects in the Vectors). Is Castor the right tool for this?

The real application is clearly much more complex than this. The graph contains "wrapper" objects which again can contain references to objects, that is, two different wrappers could reference the same object. The Vectors will contain some identical references, but also some differences. Even if my trivial sample case works, is there any chance that these more complex cases will work?

Jim

--
Jim Redman
(505) 662 5156 x85
http://www.ergotech.com



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to