ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Abator newb: table name(s)
Date Wed, 26 Dec 2007 16:35:06 GMT
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"/>

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).
> Nicholoz Kiknadze

View raw message