could someone tell me if there is still the need to write a wrapper object to persist a collection of strings?
Thank you
Antonio
On Mon, 7 Oct 2002, Oliver Wehrens wrote: > Hi, > > what do I have todo to store a vector of strings? as far as I undrstodd castor > all objects inside a collection need to have a get/set method so that castor > can store them? Is it possible to store just strings in a vector and save > it? What would the maping file for that look like? Is that possible at all? > > Thanks for your help. > > OliverSet up an object that has a vector data member that holds the strings. It is not enough to store java.lang.String objects in the vector. If you want the elements of the vector to be persisted automatically then the elements of the vector must depend on the master object (the object containing the vector). You must create a simple wrapper object that holds the string value together with a reference to the parent object. You must also specify that the wrapper object depends on the master (use the depends attribute in the mapping file). Peter
