ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tom.schi...@bestsolution.at>
Subject Re: sealectKey database abstraction
Date Tue, 12 Aug 2008 12:28:09 GMT
Why not using an XML-Entity and load different DTDs, this way you have 
your standard mapping files and only the small Entity thing is switched 
by including this or that DTD.


Ian Zabel schrieb:
> 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

B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
tom schindl                               leiter softwareentwicklung/CSO
eduard-bodem-gasse 8/3    A-6020 innsbruck      phone    ++43 512 935834

View raw message