ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Klatt" <benja...@bar54.de>
Subject AW: Ibator: Generate table name as prefix for columns
Date Wed, 15 Jul 2009 13:01:10 GMT
Hi Iwao,

thanks, this solved the challenge.

Definign the alias (even with the same name as the table) changed the
columns to be fully qualified.
The generated data model stayed with the originial Column names. Perfect!
The only downgrade is, that the alias prefixing results in long names. (i.e.
longtablename_longcolumnname  instead of longcolumnname)
But that's no problem so far.

Thanks again and all the best
Benjamin


-----Urspr√ľngliche Nachricht-----
Von: Iwao AVE! [mailto:harawata@gmail.com] 
Gesendet: Mittwoch, 15. Juli 2009 14:51
An: user-java@ibatis.apache.org
Betreff: Re: Ibator: Generate table name as prefix for columns

Hi Benjamin,

Try specifying the 'alias' attribute of the <table> element.
http://ibatis.apache.org/docs/tools/ibator/configreference/table.html

Regards,
Iwao

on 09.7.15 8:44 PM Benjamin Klatt said the following:
> Hi there,
>
> does anyone know a solution to generate the column name in the base list
> prefixed with the name of the table?
>
> I am extending the SQL  files with my own statements and need to prevent
> ambiguous columns when joining other tables in the extended map files.
>
> So I would like to manipulate the content of the
>
> <sql id="Base_Column_List">
>
> Tags.
>
> I know I can do this with a plug-in, but if there is a way I would love
> to save this effort ;)
>
> Thanks in advance.
>
> Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message