Antonio Capani wrote:

Hi,

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.

Oliver

Set 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).


Antonio,

The statement above by Peter is one way to do this. Currently Castor does not support this feature.

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'


The Castor Project
http://www.castor.org/

Apache Geronimo
http://incubator.apache.org/projects/geronimo.html



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

Reply via email to