Hi David

OJB is an object/relational *mapping* tool. it is not a OO database.
So the first thing to ask is:
How are these Strings (or other primitive types) stored in the database.
1. are they treated as ordinary domain objects and stored in a separate table?
2. are they serialized into a Varchar field?
3. are they stored as a comma separated varchar field?
4. is each element of the vector or array stored in a separate column? (this solution does only work for a fixed number of elements!)

according to your answer you have to define different mappings in OJB:
for
1.) simply define ordinary collection-descriptors as for every other collection of domain objects.
2.) use the Object2ByteArrFieldConversion. See jdbc-types.html for details on conversion strategies.
3.) use the StringVector2VarcharFieldConversion. See jdbc-types.html for details on conversion strategies.
4.) provide a field-descriptor for each element.

cheers,
Thomas

Messina, David wrote:
If I have an object A with the following definition:

public class A {
Integer id;
Vector vectorList; // consists of String elements
String[] arrList;
}


How would I define the list attribute in repository_user.xml? What about
the arrList element?

Thanks.


-- david

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to