db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quinton McCombs" <qmcco...@nequalsone.com>
Subject RE: Method name generation
Date Sat, 08 Mar 2003 02:54:46 GMT

> -----Original Message-----
> From: Steve Lukshides [mailto:lukshide@us.ibm.com] 
> Sent: Friday, March 07, 2003 5:01 PM
> To: torque-user@db.apache.org
> Subject: Method name generation
> Hi All,
> I'm new to Torque so this may have been covered before, 
> though I can't find any mention in the list archive.  Two 
> annoying things I notice right off the bat with Torque's code 
> generation are the following:
> 1. Torque will generate some methods in the BaseClass that 
> get lists of objects for columns defined as a foreign key.  
> As an example, if you have a column called CAMPUS_ID that is 
> a foreign key, Torque will generate a method called 
> getCampuss(...).  Note that the extra "s" is intentional. 
> Obviously Torque tried to make a plural out of Campus and 
> didn't quite get it right.  This is annoying because I'd have 
> to create another method that spells it correctly and just 
> calls Torque's version.  I think a better solution would be 
> for Torque to not try to create a plural and just call the 
> method getCampusList(...).

Very true.  The misspelling is annoying.  

I like the idea of having the generated method being get<tableName>List.
Just like the exception thrown by the save() method is configurable,
this could be configurable as well.  The default would remain "s" but
could be changed to anything the user wants to see in the generated
> 2. The formatting of the generated code is horrendous.  
> Indentation is completely whacked and there tends to be an 
> overabundance of blank lines. I don't want to sound like an 
> ingrate because if Torque does what I want it will give quite 
> a bit of functionality for nothing.  But the formatting of 
> the generated code would not get through a code review and 
> doesn't inspire a lot of confidence.  I don't know how others 
> feel but I tend to think that when something appears so easy 
> to fix but is ignored, I tend to wonder what else is being neglected.
> Anyway, thanks for listening, I hope these issues are 
> addressed in a future release.  So far, I'm excited to be 
> using Torque and hope it fulfills its promise.
> Regards,
> Steve Lukshides
> Sr. I/T Specialist, IBM Global Services
> 1475 Phoenixville Pike, West Chester, PA 19380
> Phone: 610-989-0340
> Voice Mail: 610-578-2385  IBM Tie Line: 873-2385
> Email: lukshide@us.ibm.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

View raw message