ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Slava Imeshev <imes...@yahoo.com>
Subject Re: IBATIS and mulit-vendor development (Oracle/Derby)
Date Fri, 17 Nov 2006 16:46:45 GMT
Guido,

Thanks for the tip!

Slava


--- Guido García Bernardo <ggb275@tid.es> wrote:

> I faced this problem, too, and I finally wrote one sql-map file per 
> dialect (oracle and mysql in my case).
> 
> In my sql-map-config.xml I put something like:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMapConfig SYSTEM 
> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>  
>     <properties resource="properties/ibatis.properties" />
>       ...
>     <sqlMap resource="my/package/dao/sql-map-tests.${sql.dialect}.xml"/>
>     <sqlMap resource="my/package/dao/sql-map-stats.${sql.dialect}.xml"/>   
> </sqlMapConfig>
> 
> With a configuration file (ibatis.properties) with an entry:
> sql.dialect=oracle
> 
> That doesn't really solve your problem but it helps :)
> Regards
> 
> Slava Imeshev escribió:
> > Hello everyone,
> >
> > I have a question. What facilities does iBatis provide to support multi-db 
> > vendor development. In other words, is it possible to develop an application 
> > with iBatis to support seamless switch between various DB platforms (Oracle and

> > Derby in my case)? 
> >
> > I am asking because in general SQL dialects are somewhat different and 
> > resorting to a least common denominator dialect is undesirable.
> >
> > Thank you.
> >
> > Slava Imeshev
> >
> >
> >   
> 
> 
> -- 
> Guido García Bernardo
> 
> Tfn. +34 983 54 89 08
> ITDEUSTO - Valladolid
> 
> 
> 


Mime
View raw message