openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r880868 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema: SchemaGroup.java SchemaTool.java
Date Mon, 16 Nov 2009 17:38:16 GMT
Author: ppoddar
Date: Mon Nov 16 17:38:16 2009
New Revision: 880868

URL: http://svn.apache.org/viewvc?rev=880868&view=rev
Log:
OPENJPA-1387: Remove non-nullable constraint from Unique column.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java?rev=880868&r1=880867&r2=880868&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
Mon Nov 16 17:38:16 2009
@@ -144,7 +144,7 @@
                 tab.importIndex(idxs[j]);
             unqs = tables[i].getUniques();
             for (int j = 0; j < unqs.length; j++)
-                tab.importUnique(unqs[j]);
+                tab.importUnique(unqs[j], null);
         }
         return copy;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java?rev=880868&r1=880867&r2=880868&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
Mon Nov 16 17:38:16 2009
@@ -590,7 +590,7 @@
                 if (dbTable == null)
                     continue;
                 for (int k = 0; k < uniques.length; k++) {
-                    dbTable.importUnique(uniques[k]);
+                    dbTable.importUnique(uniques[k], _dict);
                 }
             }
         }
@@ -957,7 +957,11 @@
      */
     public boolean createTable(Table table)
         throws SQLException {
-        return executeSQL(_dict.getCreateTableSQL(table));
+        try {   
+            return executeSQL(_dict.getCreateTableSQL(table));
+        } catch (SQLException e) {
+            return false;
+        }
     }
 
     /**



Mime
View raw message