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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]