ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Zabel <...@ezabel.com>
Subject Re: sealectKey database abstraction
Date Tue, 12 Aug 2008 12:23:42 GMT
I'd suggest that you do your development against an Oracle 10g  
database. This really is the best solution.

But, if that's not really an option, I guess you could maintain a  
separate set of sql maps for each DB. Or, maybe use Ant replacement  
variables for your build to swap out the correct sql map...

Or, maybe an alternative would be to try to come up with some sql that  
works on both databases. Not sure if SQLite supports functions, but  
maybe something like that would work.

You're really fighting the tool here.

Ian.

On Aug 12, 2008, at 4:30 AM, Perl fromSpain wrote:

> Hi,
>
> I'm using the "selectKey" with insert commands. It works great.
> We are using a development database based in SQLite, and the select  
> is like this: select max(id)+1 from TABLE
> Now, we are moving our project to the production enviroment, a  
> Oracle 10g database, and in this scenario we'll use a sequence:  
> Select theSequence.nextval from dual
>
> The problem: in each scenario, the selectKey statement must be  
> different.
> How can I avoid this, or minimize?
>
> Thanks in advance


Mime
View raw message