Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 74314 invoked from network); 12 Aug 2008 12:29:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2008 12:29:26 -0000 Received: (qmail 77596 invoked by uid 500); 12 Aug 2008 12:29:24 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 77192 invoked by uid 500); 12 Aug 2008 12:29:22 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 77181 invoked by uid 99); 12 Aug 2008 12:29:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 05:29:22 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tom.schindl@bestsolution.at designates 81.16.98.99 as permitted sender) Received: from [81.16.98.99] (HELO mail.bestsolution.at) (81.16.98.99) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 12:28:24 +0000 Received: from localhost (ogmios.bestsolution.at [81.16.98.100]) by mail.bestsolution.at (Postfix) with ESMTP id 12491BC018E for ; Tue, 12 Aug 2008 14:28:19 +0200 (CEST) X-Virus-Scanned: BestSolution.at amavisd-new at bestsolution.at Received: from mail.bestsolution.at ([81.16.98.97]) by localhost (ogmios.bestsolution.at [81.16.98.100]) (amavisd-new, port 10026) with LMTP id M7WA44qx4uQi for ; Tue, 12 Aug 2008 14:28:10 +0200 (CEST) Received: from lodis.bestsolution.at (heimdall.bestsolution.at [81.16.98.98]) by mail.bestsolution.at (Postfix) with ESMTPA id 6DE26BC0527 for ; Tue, 12 Aug 2008 14:28:10 +0200 (CEST) Message-ID: <48A181D9.3020304@bestsolution.at> Date: Tue, 12 Aug 2008 14:28:09 +0200 From: Tom Schindl User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: sealectKey database abstraction References: <1cdc72bd0808120130v656322e3u81c18b0cf44e7e09@mail.gmail.com> <34D5F7AF-6839-4154-85B7-E35F0DAFE9A9@ezabel.com> In-Reply-To: <34D5F7AF-6839-4154-85B7-E35F0DAFE9A9@ezabel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. Tom 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