ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: switch database (different sql code)
Date Tue, 19 Jul 2005 16:11:43 GMT
I would take this one small step further.  I would create a common  
xml file for all aspect that are well common.  Then I would create  
different maps for the unique queries.


On Jul 19, 2005, at 9:38 AM, Brice Ruth wrote:

> You can include SQL code from a properties file. So, setup one that  
> has the salient SQL code in it for Oracle, and one for Postgres,  
> then you don't have to change the XML, just use a property and make  
> sure that when the app starts, the correct property file is loaded.
> Make sense?
> 2005/7/19, Ron Kirchheimer <rkirchheimer@infometis.ch>:
> hi all
> i'm using ibatis sql-maps and dao framework (version 2).
> my java application should run on an oracle and postgres database.
> (switchable through a properties file)
> now the problem is, that i must write different sql code for some
> statements (not a lot)
> > to bad that there isn't a real sql standard!
> so what would be the best way to handle this?
> i don't want to copy all the sql-map xml files, because most of the
> sql code will stay as it is.
> thx for your help
> ron
> -- 
> Brice Ruth
> Software Engineer, Madison WI

View raw message