Thanx Dave, but the emails are not stored as comma seperated values in the database.
They have a seperate table:
person_id int, email varchar
I need to map the table. I will try to play w/ the FieldConversions...
--Bobby



Dave Sunerton-Burl wrote:

Bobby Lawrence wrote:

Having a little difficulty w/ this...
How would I map a collection or array of Strings in a class?
I have a person object and I have a member variable called "emails" that is a String[] type.
How would I set up my class-descirptor to get this to work without having to create a bean to only store the email string?


I would recommend implementing FieldConversion where you store a string in the database (e.g. emails separated by commas) and write your FieldConversion class to convert between delimited String and String[]. Here's the details;
http://db.apache.org/ojb/docu/guides/jdbc-types.html#field-conversion


If you get the OJB code, you can use one of the classes in the org.apache.ojb.broker.accesslayer.conversions package as an example starting point.

Dave Sunerton-Burl
Lledr Solutions

Email : [EMAIL PROTECTED]
Phone : +44 (0)1690 750446
Web : www.lledr-solutions.com

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


-- ---------------------------- Bobby Lawrence MIS Application Developer

Jefferson Lab (www.jlab.org)

Email: [EMAIL PROTECTED]
Office: (757) 269-5818
Pager: (757) 584-5818
----------------------------





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



Reply via email to