You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by ht...@apache.org on 2013/07/19 01:28:27 UTC

svn commit: r1504719 - in /openjpa/branches/2.2.1.x: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Author: hthomann
Date: Thu Jul 18 23:28:27 2013
New Revision: 1504719

URL: http://svn.apache.org/r1504719
Log:
OPENJPA-2387: Fix to exclude schema name when checking the length of a sequence name.

Modified:
    openjpa/branches/2.2.1.x/   (props changed)
    openjpa/branches/2.2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Propchange: openjpa/branches/2.2.1.x/
------------------------------------------------------------------------------
  Merged /openjpa/branches/2.0.x:r1504611

Modified: openjpa/branches/2.2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=1504719&r1=1504718&r2=1504719&view=diff
==============================================================================
--- openjpa/branches/2.2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java (original)
+++ openjpa/branches/2.2.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java Thu Jul 18 23:28:27 2013
@@ -3488,8 +3488,10 @@ public class DBDictionary
 
         StringBuilder buf = new StringBuilder();
         buf.append(create ? "CREATE" : "ALTER").append(" SEQUENCE ");
-        String seqName = checkNameLength(getFullName(seq), maxTableNameLength, 
-                "long-seq-name");
+        
+        String seqName = checkNameLength(toDBName(seq.getFullIdentifier().getUnqualifiedName()), 
+            maxTableNameLength, "long-seq-name");
+
         buf.append(seqName);
         if (create && seq.getInitialValue() != 0)
             buf.append(" START WITH ").append(seq.getInitialValue());