That's what I thought, untill I realised that eric's strings are stored as rows in a table, as opposed to a single column.
Cheers, Charles. > -----Original Message----- > From: Mahler Thomas [mailto:[EMAIL PROTECTED] > Sent: 24 November 2003 16:31 > To: 'OJB Users List' > Subject: RE: Collection of string > > > > Hi there is a very nice feature in OJB to handle this: > > 1. Define your DB coulm as VARCHAR. > 2. in the repository_user.xml you set > conversion="org.apache.ojb.broker.accesslayer.conversions.Stri > ngVector2Varch > arFieldConversion" > 3. That's all! > > All strings of your Vector get concatened and written to the > VARCHAR column > in human readable form. > > cu, > Thomas > > > -----Original Message----- > > From: eric barbe [mailto:[EMAIL PROTECTED] > > Sent: Monday, November 24, 2003 3:27 PM > > To: OJB Users List > > Subject: RE: Collection of string > > > > > > Yes, you're right, but what do you think about Hibernate > > witch seems to do > > this very simply ? > > > > Eric > > > > -----Message d'origine----- > > De : Thomas Dudziak [mailto:[EMAIL PROTECTED] > > Envoye : lundi 24 novembre 2003 11:01 > > A : OJB Users List > > Objet : RE: Collection of string > > > > > > > > > > On Mon, 24 Nov 2003, eric barbe wrote: > > > > > Hi Thomas, > > > > > > Thanks for your help. > > > I thought about this solution, but honestly, it is not very > > beautiful. > > > They are no other ways ? > > > Is it possible to hope that OJB will do this easily in a > > future release ? > > > > Thats not so much a problem of OJB but a design decision of > > Java. Strings > > are immutable after creation (value objects). OJB can work with all > > objects that are changeable after creation and have a default > > constructor. > > Actually, that is not quite correct. It seems that in the > current CVS > > version you can define a factory class and method to create > objects so > > there is no need for the default constructor anymore. So in > > theory, you > > might be able to use strings after all, using a combination of > > factory-class/method and a custom row-reader for the string objects > > (I'm not an expert of row-readers so this might be wrong). > But this is > > probably not quite an elegant solution. > > > > As for the "beauty" of the solution, that depends on your > > application, or > > more precisely, on how the strings are used. If there is > functionality > > that can be put into the wrapper objects (say, conversion > > from exceptions, > > serialization to/from XML etc.) then they can actually make > > the design of > > your system more beautiful. > > > > Tom > > > > > > > --------------------------------------------------------------------- > > 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] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ___________________________________________________________ HPD Software Ltd. - Helping Business Finance Business Email terms and conditions: www.hpdsoftware.com/disclaimer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
