From b013b6fd4a420dcb5dffd97e6e99669e67286d3e Mon Sep 17 00:00:00 2001 From: Catalina Wei Date: Thu, 10 Jan 2008 06:55:17 +0000 Subject: [PATCH] OPENJPA-471 iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY) or @GeneratedValue(strategy=GenerationType.SEQUENCE) git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@610697 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java index 5762523ef..f49cd42fc 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java @@ -279,6 +279,10 @@ public class DB2Dictionary break; case db2ISeriesV5R3OrEarlier: case db2ISeriesV5R4OrLater: + lastGeneratedKeyQuery = "SELECT IDENTITY_VAL_LOCAL() FROM " + + "SYSIBM.SYSDUMMY1"; + nextSequenceQuery = "SELECT NEXTVAL FOR {0} FROM " + + "SYSIBM.SYSDUMMY1"; validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM " + "QSYS2.SYSTABLES"; sequenceSQL = "SELECT SEQUENCE_SCHEMA, "