Hi Bobby,

think with a FieldConversion this will not be possible to realize. There was a similar post some days ago. Sorry, currently I don't know a way to handle this without a bean class.

Please make a feature request (if there wasn't one for this) on jira.

regards,
Armin

Bobby Lawrence wrote:
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]



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



Reply via email to