arminw      2005/07/15 07:37:19

  Modified:    src/java/org/apache/ojb/broker/platforms Tag:
                        OJB_1_0_RELEASE PlatformSybaseASEImpl.java
  Log:
  fix OJB-59, by Stépane Routhiau
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.6.2.1   +10 -2     
db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseASEImpl.java
  
  Index: PlatformSybaseASEImpl.java
  ===================================================================
  RCS file: 
/home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformSybaseASEImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- PlatformSybaseASEImpl.java        4 Apr 2004 23:53:35 -0000       1.6
  +++ PlatformSybaseASEImpl.java        15 Jul 2005 14:37:19 -0000      1.6.2.1
  @@ -27,5 +27,13 @@
    */
   public class PlatformSybaseASEImpl extends PlatformSybaseImpl
   {
  -
  +    public String getLastInsertIdentityQuery(String tableName)
  +    {
  +        // 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 (e.g. by setting the useAutoCommit="1"
  +        // or useAutoCommit="2" or by external configuration)
  +        return "SELECT @@IDENTITY AS id FROM " + tableName;
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to