Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 85953 invoked from network); 11 Feb 2010 09:58:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 09:58:34 -0000 Received: (qmail 46181 invoked by uid 500); 11 Feb 2010 09:58:34 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 46124 invoked by uid 500); 11 Feb 2010 09:58:33 -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 46116 invoked by uid 99); 11 Feb 2010 09:58:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 09:58:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of abosetti@burrows.co.uk designates 193.128.183.23 as permitted sender) Received: from [193.128.183.23] (HELO burrows2.wd.web.eu.uu.net) (193.128.183.23) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 11 Feb 2010 09:58:24 +0000 Received: from pcdev ([217.41.52.173]) by burrows2.wd.web.eu.uu.net ; Thu, 11 Feb 2010 09:57:59 +0000 Message-ID: From: "A Bosetti" To: Subject: ibator best strategy with multiple table formats Date: Thu, 11 Feb 2010 09:58:02 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B6_01CAAB00.B2C512D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3311 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3311 X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_00B6_01CAAB00.B2C512D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all I am new to Ibatis and fairly new with java too so please bear it with = me. I have Eclipse 3.4, Java 1.6.17, Ibatis 2.3.4 and Ibator, all wired up = with Spring 2.5.6. I have an application that has an internal database and that also needs = to connect to an external database. The external database is provided by the customers and is made up of = several tables (about 20) and it comes in two different formats (both = formats are on Oracle), one that uses timestamps and the other one that = uses a string representation of datetime. (Oracle 7 didnt have = timestamps apparently) There are only 3 fields in the whole database that are affected, = everything else is exactly the same. I have been given this version of the database with timestamps as a mock = to test and develop my application before delivery,(which is the most = common), but the application will have to run transparently on both = versions of the database. Obviously I don't have any control on the customers database but I wish = to use Ibatis with Ibator as I find it very good. What is a good strategy in this case? I thought I could for instance treat the two databases as completely = indipendent, generate two different versions of the ibator artifacts and = inject the correct one to activate using spring, but it's a bit overkill = to have to generate 20 different maps, 20 daos, 20 object models just = because of 3 fields. Then I thought it's better to modify the ibatismaps and inside the = single generated map, have two versions of every statement that is = affected by these fields (different inserts, selects etc), but is not = very nice either, because then I need to manually modify the daos to = call to correct statements. Can you point me in the right direction? What is the most maintanable = and elegant way to achieve this? Thank you in advance=20 Alessandro ------=_NextPart_000_00B6_01CAAB00.B2C512D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi all
 
I am new to Ibatis and fairly new with = java too so=20 please bear it with me.
 
I have Eclipse 3.4, Java 1.6.17, Ibatis = 2.3.4 and=20 Ibator, all wired up with Spring 2.5.6.
 
I have an application that has an = internal database=20 and that also needs to connect to an external database.
 
The external database is provided by = the customers=20 and is made up of several tables (about 20) and it comes in two = different=20 formats (both formats are on Oracle), one that uses timestamps and the = other one=20 that uses a string representation of datetime. (Oracle 7 didnt have = timestamps=20 apparently)
There are only 3 fields in the whole = database that=20 are affected, everything else is exactly the same.
 
I have been given this version of the = database with=20 timestamps as a mock to test and develop my application before = delivery,(which=20 is the most common), but the application will have to run transparently = on both=20 versions of the database.
Obviously I don't have any control on = the customers=20 database but I wish to use Ibatis with Ibator as I find it very=20 good.
 
What is a good strategy in this = case?
 
I thought I could for instance treat = the two=20 databases as completely indipendent, generate two different versions of = the=20 ibator artifacts and inject the correct one to activate using spring, = but it's a=20 bit overkill to have to generate 20 different maps, 20 daos, 20 object = models=20 just because of 3 fields.
 
Then I thought it's better to modify = the ibatismaps=20 and inside the single generated map, have two versions of every = statement that=20 is affected by these fields (different inserts, selects etc), but is not = very=20 nice either, because then I need to manually modify the daos to call to = correct=20 statements.
 
Can you point me in the right = direction? What is=20 the most maintanable and elegant way to achieve this?
 
Thank you in advance
 
Alessandro
 
 
 
 
------=_NextPart_000_00B6_01CAAB00.B2C512D0--