ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meindert" <meind...@pastelebusiness.com>
Subject RE: Fetching ids from oracle and postgresql sequences
Date Fri, 24 Aug 2007 06:50:59 GMT
I'm keeping all (and only) my 'problem' sql statements in a xml file per
database type and call it something like mysql.xml.
In database.properties I state what the database type=>dbtype=mysql
In sql-map-config I link the xml file using the property;
<sqlMap resource="com/pastel/ess/persistence/sqlmapdao/sql/${dbtype}.xml"/>


-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: 23 August 2007 10:12 PM
To: user-java@ibatis.apache.org; lmeadors@apache.org
Subject: RE: Fetching ids from oracle and postgresql sequences

BTW: That goes for pretty much any vendor specific SQL.

JDBC does a great job keeping stored proc calls consistent.  So hiding your
Oracle CONNECT BY and friends in a proc makes it easier to recreate in
another database without having to change your Java code or iBATIS SQL Maps.

Clinton

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf Of
Larry Meadors
Sent: August-23-07 1:44 PM
To: user-java@ibatis.apache.org
Subject: Re: Fetching ids from oracle and postgresql sequences

I dunno, I think I like that better than my way - that's pretty tidy.

Heh, I may have a new way to do this. :-)

Larry


On 8/23/07, Koka Kiknadze <226057@gmail.com> wrote:
> Here is an ugly way:
> Wrap sequence selects in database procedures with out param returning
> sequence value. Calling procedures have same syntax in both database
> flavours...
>


Mime
View raw message