Thanks a lot for your info. I already saw a feature request being added. I still have two questions though: 1) Which table element do you mean? Is it in the preferences xml file? 2) The 'Middlegen smartness' would work fine for me, but in my case the two accessors (setGla/getGla) which should have been (setGlas/getGlas) point to a single instance - the methods take rsp. return a GlasLocal - so there was no reason for Middlegen trying to pluralise. Rather it seems to me it thought it was Plural (because of the final s) and therefore chopped it off. Is my description correct and does the fixed Util class in CVS solve this issue?
Thanks, Bernhard -----Urspr�ngliche Nachricht----- Von: Aslak Helles�y [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 8. August 2002 19:12 An: Meyer-Willner, Bernhard; [EMAIL PROTECTED] Betreff: RE: [Middlegen-user] Final S gets chopped in CMR methods Hi Bernhard, Middlegen tries to be smart and pluralise or singularise english words, depending on the cardinality. This is done in middlegen.Util.singularise() and middlegen.Util.pluralise(). This code is not optimal, and even if it were, it would never work for other languages. I propose the following: add two attributes to the <table> element where you can specify the desired singular and plural form. Example: <table name="toys" singular="toy" plural="toys"/> If you like this approach, please submit a feature request. If you don't maybe you have an other suggestion? Cheers, Aslak > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Meyer-Willner, Bernhard > Sent: 8. august 2002 15:30 > To: '[EMAIL PROTECTED]' > Subject: [Middlegen-user] Final S gets chopped in CMR methods > > > Hi, > > I wonder if this is a known issue. I have a bean called GlasBean (ejb-name > is Glas). Another bean has a one-to-one relationship with the GlasBean. > Problem is, the generated CMR accessors are named setGla and > getGla instead > of the appropriate setGlas and getGlas. I looked at the template and the > util methods and it seems there's some messing around going on with > adding/chopping S's depending on the cardinality of the relationship (s > added if multiplity is many). The generated one-to-many relationship > accessor names are all fine, as are all the other one-to-one accessors I > have. Can you tell me why the s gets chopped and maybe give me a hint to > work around this? > > Thanks, > Bernie > > --- > Bernhard Meyer-Willner > > Insurance - Financial Services > Logica GmbH > Alster City > Osterbekstrasse 90b > 22083 Hamburg (Germany) > (+49) 40-27071-405 > (+49) 177-425-9036 > mailto:[EMAIL PROTECTED] > www.logica.de > > > > > This e-mail and any attachment is for authorised use by the > intended recipient(s) only. It may contain proprietary material, > confidential information and/or be subject to legal privilege. > It should not be copied, disclosed to, retained or used by, any > other party. If you are not an intended recipient then please > promptly delete this e-mail and any attachment and all copies and > inform the sender. Thank you. > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
