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: changing databases question
Date Mon, 26 Feb 2007 16:46:07 GMT
Abator has a new feature in SVN that may help you...you can ask Abator not
to include the schema name in the generated SQL.  So you could generate
objects against one schema, but then use the generated objects against many
different schemas (assuming you can set a default schema as a connection
setting).

To use it, do this:
<table ...>
  <property name="ignoreQualifiersAtRuntime" value="true"/>
</table>

You'll also need to build Abator from SVN as this feature is not publically
released yet.

Jeff Butler





On 2/26/07, Thomas Karl Schwaerzler <Thomas.Schwaerzler@uibk.ac.at> wrote:
>
>
>
>
> i'm trying to use 2 different databases with abator. they only differ in
> their schema names, until now i've used a workaround that i'm not really
> satisfied with:
>
> in the autogenerated method everything works fine if i just change the
> schema name...
>
> but in my *Impl.java i run into a problem with the self generated queries:
>
>
> example:
>
> String state = (String) queryForObject(schema +
> "_ODM_BILL.getBillStateByOrderId", orderId);
>
>
> --> i have to set schema in every *Impl.java and do dynamic queries like
> above.
>
> also setting settings in <sqlMapConfig>
>
> useStatementNamespaces="false"
>
> leads to trouble as i read on this list:
>
>
> http://mail-archives.apache.org/mod_mbox/ibatis-user-java/200606.mbox/%3CB15398DFAE5DA3448AC9DC9B5FF1156403D21246@medspserv005.polimed.com.br%3E
>
> here Jeff Butler writes:
>
> <quote>
> 1. You need to specify useStatementNamespaces="true".  You'll not get far
> with Abator if you disable namespaces.
> </quote>
>
>
> loooking forward for any suggestions, hints...
>
>
> Thomas Schwaerzler
> DEA Innsbruck
> Department for Digitisation and Digital Preservation
> University Innsbruck Library
> 6020 Innsbruck - Innrain 52 - Austria
> Phone: ++43-(0)512-507-2489
> Fax: ++43-(0)512-507-9842
> Email: <Thomas.Schwaerzler@uibk.ac.at>
> URL: http://www2.uibk.ac.at/ub/dea/
>
>
>

Mime
View raw message