Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 83348 invoked from network); 26 Dec 2007 21:02:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Dec 2007 21:02:47 -0000 Received: (qmail 75942 invoked by uid 500); 26 Dec 2007 21:02:35 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 75319 invoked by uid 500); 26 Dec 2007 21:02:34 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 75308 invoked by uid 99); 26 Dec 2007 21:02:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Dec 2007 13:02:34 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of 226057@gmail.com designates 209.85.134.189 as permitted sender) Received: from [209.85.134.189] (HELO mu-out-0910.google.com) (209.85.134.189) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Dec 2007 21:02:12 +0000 Received: by mu-out-0910.google.com with SMTP id g7so1759381muf.0 for ; Wed, 26 Dec 2007 13:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=CQk34r7yxBg0rIACLB7FJtOFqs2fkOwY4llLR+IGMSY=; b=p2Auk2yESX7rHuv/eSPN5I4TdflSo0dm9Uq8wNzhwwhMNLQ40apmQytwdNCyIvkw1jeP/irMcQwts9kjjVfLtJbxYVwnvw4+nAUtvk5mCr7v0Gcy9Jhn/xhxS5y64JpE0DZwUTL8KUj5DjaNYoVfstLT2SDn5KIAX3a/1IRzaJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=S+gsXoUBwIeEx/8xQywTvi0/o/nWk/ADnuR5pie5bsib9UarDyw2J+9IxQi8Wbc/sRy7A9u0Y0/qm3IZ4YmfNGs9N0EzH2R0PLfeckHUYFFG+Z2ED1XgFcgvTXe4my6SZIolMMiRM+gAl6jtS4voIF+vhBSLhkeGkylWlffcPe4= Received: by 10.78.147.6 with SMTP id u6mr8705413hud.59.1198702935034; Wed, 26 Dec 2007 13:02:15 -0800 (PST) Received: by 10.78.199.10 with HTTP; Wed, 26 Dec 2007 13:02:14 -0800 (PST) Message-ID: <46d2280d0712261302x7f2bab01rdbc76e23c78ad6c6@mail.gmail.com> Date: Thu, 27 Dec 2007 01:02:15 +0400 From: "Koka Kiknadze" <226057@gmail.com> To: user-java@ibatis.apache.org Subject: Re: Abator newb: table name(s) In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9384_13131694.1198702935024" References: <46d2280d0712260407p4078a5e5jd990663ca2c075ce@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9384_13131694.1198702935024 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for prompt reply even at this holiday time :) Yes I know we have flexibility of overriding things. Great, but, well, I'd better poke in the source code to change it to avoid overriding table names for every table just to remove 's'-es, but sure I'll try useActualColumnNames. Still I think its common in DB development to name tables in plural, so maybe I could avoid hacking the abator code in some next releases ;) Anyway, for my current new project, I can live with table names like Employee, but I'll try to find time to modify the abator code that converts table names into class names. Thanks for great work Jeff, agrrr, yet another reason to move to eclipse, still stuck with netbeans... Thanks On Dec 26, 2007 8:35 PM, Jeff Butler wrote: > 1. By default the domain object name is calculated from the table name as > you see. You can rename it by specifying this: > > > > 2. Regarding the column names, Abator will respect case if the > "useActualColumnNames" property is set like this: > >
> >
> > Of course, this is dependant on the driver returning the column names in > mixed case - sometimes drivers will return column names in upper case only. > If this doesn't work, you can rename individual columns with a > configuration element. If you do switch to namings like > Some_Column, then it will work as you want out of the box, but I wouldn't do > that just to satisfy Abator. > > Hope that helps... > Jeff Butler > > > > > > On Dec 26, 2007 6:07 AM, Koka Kiknadze <226057@gmail.com> wrote: > > > Merry Christmas, > > > > At last found time to start playing with Abator. Wow, after the first > > run it's already clear it'll save tons of time. > > The things I found a bit annoying are the following: > > > > I am used to table names like: Employees, Cities > > And the corresponding classes: Employee, City > > > > Is it possible to 'ask' abator to remove plural (say, converting 'ies' > > to 'y' and removing remaining 's' at the end of table names) from table > > names? > > > > Another thing is that although column name is like SomeColumn, in the > > generated class I get get/setSomecolumn (not get/setSomeColumn). Does not > > abator respect case? Or is that my MS SQL driver problem? Or should I switch > > to naming columns like Some_Column (the habit from years of using oracle > > which I'm trying to overcome). > > > > TYA > > > > Nicholoz Kiknadze > > > > > > > ------=_Part_9384_13131694.1198702935024 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for prompt reply even at this holiday time :)

Yes I know we have flexibility of overriding things. Great, but, well, I'd better poke in the source code to change it to avoid overriding table names for every table just to remove 's'-es, but sure I'll try useActualColumnNames.

Still I think its common in DB development to name tables in plural, so maybe I could avoid hacking the abator code in some next releases ;)

Anyway, for my current new project, I can live with table names like Employee, but I'll try to find time to modify the abator code that converts table names into class names.

Thanks for great work Jeff, agrrr, yet another reason to move to eclipse, still stuck with netbeans...

Thanks



On Dec 26, 2007 8:35 PM, Jeff Butler < jeffgbutler@gmail.com> wrote:
1. By default the domain object name is calculated from the table name as you see.  You can rename it by specifying this:
 
<table tableName="Cities" domainObjectName="City"/>
 
2. Regarding the column names, Abator will respect case if the "useActualColumnNames" property is set like this:
 
<table tableName="Cities" domainObjectName="City">
  <property name="useActualColumnNames" value="true"/>
</table>
 
Of course, this is dependant on the driver returning the column names in mixed case - sometimes drivers will return column names in upper case only.  If this doesn't work, you can rename individual columns with a <columnOverride> configuration element.  If you do switch to namings like Some_Column, then it will work as you want out of the box, but I wouldn't do that just to satisfy Abator.
 
Hope that helps...
Jeff Butler
 
 
 


On Dec 26, 2007 6:07 AM, Koka Kiknadze <226057@gmail.com> wrote:
Merry Christmas,

At last found time to start playing with Abator. Wow, after the first run it's already clear it'll save tons of time.
The things I found a bit annoying are the following:

I am used to table names like: Employees, Cities
And the corresponding classes: Employee, City

Is it possible to 'ask' abator to remove plural (say, converting 'ies'  to 'y' and removing remaining 's' at the end of table names) from table names?

Another thing is that although column name is like SomeColumn, in the generated class I get get/setSomecolumn (not get/setSomeColumn). Does not abator respect case? Or is that my MS SQL driver problem? Or should I switch to naming columns like Some_Column (the habit from years of using oracle which I'm trying to overcome).

TYA

Nicholoz Kiknadze




------=_Part_9384_13131694.1198702935024--