db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformDb2Impl.java
Date Fri, 19 Dec 2003 18:01:10 GMT
thma        2003/12/19 10:01:10

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformDb2Impl.java
  Log:
  sequence fix by matthias roth
  
  Revision  Changes    Path
  1.8       +10 -6     db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java
  
  Index: PlatformDb2Impl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDb2Impl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PlatformDb2Impl.java	9 Dec 2003 22:48:20 -0000	1.7
  +++ PlatformDb2Impl.java	19 Dec 2003 18:01:10 -0000	1.8
  @@ -98,9 +98,13 @@
       {
           return "drop sequence " + sequenceName;
       }
  -
  -    public String getLastInsertIdentityQuery(String tableName)
  -    {
  -        return "values IDENTITY_VAL_LOCAL() fetch first row only";
  -    }
  +  
  +	public String getLastInsertIdentityQuery(String tableName)
  +	{
  +		// matthias.roth@impart.ch
  +		// the function is used by the org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl
  +		// this call must be made before commit the insert cammand, so you
  +		// must turn off autocommit by seting the useAutoCommit="2"
  +		return "select IDENTITY_VAL_LOCAL() from sysibm.sysdummy1";
  +	}
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message