Thanks for the input - I'll give it a try - though the problem is that I still need the C objects.
At one point i need an A object with all its B objects and then (depending on user input) I need one B object with all its C objects. So I don't think the transient-option will work for me.
Maybe a separate mapping file would do the trick - if that is possible ...???
Anyway thanks a lot for the quick answers,
Tom
Keith Visco wrote:
You can have a mapping file that marks the "C" field as transient for XML:<field name="c" type="C"> <bind-xml transient="true"/> </field> --Keith Ijonas Kisselbach wrote:As far as I know, and I might be wrong, this requires some handcoding which I've done in the past: for (Iterator bIterator=a.getBs().iterator();bIterator.hasNext(); ) { B b = (B)bIterator.next(); b.setCs(null); <------------------------------ crucial line } Marshaller.unmarshall(a); I wonder if marshalling with different mapping files could work ? E.g. have a second mapping file loaded into a marshaller where there is no mapping between Bs and Cs. Hope it helps, Hope I'm not totally wrong, Ijonas. -----Original Message----- From: Tom Ziemer [mailto:[EMAIL PROTECTED]] Sent: 02 October 2002 08:40 To: [EMAIL PROTECTED] Subject: [castor-dev] Marshalling question Hi, I've just started using castor, but I really do like what I have seen so far. Yet I have a problem: My program mainly consists of 3 objects: A, B and C. A has got a vector that stores objects of type B and B in turn has got a vector filled with objects of type C. Now my question is, can I somehow tell CASTOR to marshal only a certain part of these objects? For example, all A, and B objects yet NOT the C-objects? Or do I have to do this via OQL? Or is it not possible at all and I have to create my own methods to do this? Thanks, Tom ----------------------------------------------------------- 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
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
