db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stépane Routhiau (JIRA) <j...@apache.org>
Subject [jira] Created: (OJB-59) Incorrect identity management in SequenceManagerNativeImpl because of wrong plate-forme settings
Date Wed, 13 Jul 2005 10:13:10 GMT
Incorrect identity management in SequenceManagerNativeImpl because of wrong plate-forme settings
------------------------------------------------------------------------------------------------

         Key: OJB-59
         URL: http://issues.apache.org/jira/browse/OJB-59
     Project: OJB
        Type: Bug
  Components: PB-API  
    Versions: 1.0.3    
 Environment: Sybase
    Reporter: Stépane Routhiau
    Priority: Critical


The request for getting the last insert identity is wrong on Sybase ASE, it shoud be the same
as MsSQLServer. We tested the following code, that
work. Thanks to include it in the next releases.

Best regards 

Stephane Routhiau


--------------------------

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 by setting the useAutoCommit="1" or useAutoCommit="2"
        return "SELECT @@IDENTITY AS id FROM " + tableName;
    } 
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
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