ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koka Kiknadze" <226...@gmail.com>
Subject Re: Abator newb: table name(s)
Date Wed, 26 Dec 2007 21:02:15 GMT
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
> >
> >
> >
>

Mime
View raw message