arminw 2005/07/15 08:09:59
Modified: src/java/org/apache/ojb/broker/platforms
PlatformSybaseASEImpl.java
Log:
fix OJB-59, by Stépane Routhiau
Revision Changes Path
1.7 +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.7
diff -u -r1.6 -r1.7
--- PlatformSybaseASEImpl.java 4 Apr 2004 23:53:35 -0000 1.6
+++ PlatformSybaseASEImpl.java 15 Jul 2005 15:09:59 -0000 1.7
@@ -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]