Peter, This sounds similar to a problem we had - in our case we had a FK in the DB to another 1st-class business object that would need to be marshalled. What I did was create a Reference class that knew the type and id of the asset that it referred to so that it could resolve into the referred-to object on demand. This had the additional benefit of allowing me to do references to the same type which is a bit problematic with castor...
Hope this is helpful - Margaret -----Original Message----- From: Szabo Peter [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 5:17 AM To: [EMAIL PROTECTED] Subject: [castor-dev] references in collections Hello, We are thinking about how to write a mapping file (section) to describe a collection (ArrayList) which contains a set of objects which are references to an other part of our (to be marshalled too) modell. Eg: class A has a private ArraList theList; //This list contains objects of type B. with getter/setter And in a larger view we have a type C which contains a lot of things, among them a pool of type B, and possibly one-or-more type A (and here the list points to some items of our pool). class C has private ArrayList cPool; // here are a lot of stuff of type C private A pointerHolder; // that's of type A, and contains references to the C instances in the pool ... I hope it is clear enough to get some hints. thanks in advance, Peter ----------------------------------------------------------- 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
