openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r680413 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Date Mon, 28 Jul 2008 17:29:15 GMT
Author: ppoddar
Date: Mon Jul 28 10:29:15 2008
New Revision: 680413

URL: http://svn.apache.org/viewvc?rev=680413&view=rev
Log:
OPENJAP-664: Check length constraint onIndex name, not on the table on which index is created

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=680413&r1=680412&r2=680413&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Mon Jul 28 10:29:15 2008
@@ -3165,10 +3165,10 @@
         buf.append("CREATE ");
         if (index.isUnique())
             buf.append("UNIQUE ");
-        buf.append("INDEX ").append(index.getName());
-        String indexName = checkNameLength(getFullName(index.getTable(), false), 
-        		maxIndexNameLength, "long-index-name");
-        buf.append(" ON ").append(indexName);
+        String indexName = checkNameLength(index.getName(), maxIndexNameLength, 
+                "long-index-name");
+        buf.append("INDEX ").append(indexName);
+        buf.append(" ON ").append(getFullName(index.getTable(), false));
         buf.append(" (").append(Strings.join(index.getColumns(), ", ")).
             append(")");
 



Mime
View raw message