From 53dddbeb8f0468a1f0728cd3e08a7d9d9cd1c701 Mon Sep 17 00:00:00 2001 From: Fay Wang Date: Tue, 23 Mar 2010 19:27:24 +0000 Subject: [PATCH] OPENJPA-1596: make valid index name for DB2 zOS git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@926741 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 37bf68886..41c28ad84 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 @@ -912,7 +912,8 @@ public class DB2Dictionary // build the index for the sequence tables // the index name will be the fully qualified table name + _IDX Table tab = schema.getTable(table); - Index idx = tab.addIndex(DBIdentifier.append(tab.getFullIdentifier(), "IDX")); + DBIdentifier idxName = DBIdentifier.append(tab.getFullIdentifier(), "IDX"); + Index idx = tab.addIndex(getValidIndexName(idxName, tab)); idx.setUnique(true); idx.addColumn(pkColumn); }