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:[EMAIL PROTECTED] Sent: 23 August 2007 10:12 PM To: [email protected]; [EMAIL PROTECTED] 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: August-23-07 1:44 PM To: [email protected] 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 <[EMAIL PROTECTED]> 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... >
