ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: iBatis and multiple databases
Date Wed, 08 Jun 2005 15:33:51 GMT
Currently, i do not think this is documented. But, the idea is that
the discriminator defines a  column whose value will be examined and
compared against the subMap tag's value attribute to see which
subMap's resultMap should be included. You may also use the extend
functionality on the resultMap to extend another resultMap.

http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/Documents.xml

Brandon

On 6/8/05, Brandon Goodin <brandon.goodin@gmail.com> wrote:
> oops bad advice. Forget option (1). Mapped statements do not have
> extend... only resultMap.
> 
> Sorry
> Brandon
> 
> On 6/8/05, Brandon Goodin <brandon.goodin@gmail.com> wrote:
> > There is not one way to support multiple databases with ibatis. There
> > are several options to manage multiple database support.
> >
> > Examples
> > (1) Use the extends functionality to override particular statements
> > that are specific to your database while leaving cross database sql
> > statements alone.
> > (2) separate your sqlmap files into slqmaps that can be standard sql
> > and others that are non-standard and customize them for the particular
> > database you are working against.
> > (3) you could have a couple sets of sqlmap files. One for support
> > Sybase SQL and one for supporting Oracle SQL.
> >
> > Brandon
> >
> > On 6/8/05, Emiliano Armellin <earmellin@ateikon.com> wrote:
> > >  Hello,
> > >
> > >  I've got this problem: my application (spring+ibatis) works good on a
> > > Sybase DB but now I have to make it work on Oracle DB.
> > >  Oracle uses a different syntax for left/right join so I have to change
> > > sql-maps files. Well it's not so difficult but I'm asking: which is the best
> > > way to manage this kind of problem with ibatis? Which is the best way to
> > > make sql-maps db independent? Is there a simple way to do it?
> > >
> > >  any suggestion?
> > >
> > >
> > >
> > > --
> > >
> > > Emiliano Armellin
> > >
> > >
> > > W_ www.ateikon.com
> > >
> > > @_ earmellin@ateikon.com
> > >
> > > T_ +39 0422 452101
> > >
> > >
> >
>

Mime
View raw message