[OFBiz] SVN: r4938 - trunk/framework/entity/src/org/ofbiz/entity/jdbc

jonesde at svn.ofbiz.org jonesde at svn.ofbiz.org
Mon May 2 17:57:29 EDT 2005


Author: jonesde
Date: 2005-05-02 16:57:26 -0500 (Mon, 02 May 2005)
New Revision: 4938

Modified:
   trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
Log:
Added CASCADE back for at least the CONSTRAINT clause; leaving out for PRIMARY KEY clause, not sure what to do with that, the DROP PRIMARY KEY clause is DB specific and not part of the SQL2003 spec (didn't lookup earlier specs)

Modified: trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
===================================================================
--- trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java	2005-05-02 21:39:09 UTC (rev 4937)
+++ trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java	2005-05-02 21:57:26 UTC (rev 4938)
@@ -2157,10 +2157,11 @@
             if (usePkConstraintNames) {
                 sqlBuf.append("CONSTRAINT ");
                 sqlBuf.append(pkName);
+                sqlBuf.append(" CASCADE");
             } else {
                 sqlBuf.append(" PRIMARY KEY");
+                // DEJ20050502 not sure why this is here, shouldn't be needed and some dbs don't support like this, ie when used with PRIMARY KEY: sqlBuf.append(" CASCADE");
             }
-            // DEJ20050502 not sure why this is here, shouldn't be needed and some dbs don't support like this, ie when used with PRIMARY KEY; may still want to put it in for the CONSTRAINT variation, if needed: sqlBuf.append(" CASCADE");
 
             if (Debug.verboseOn()) Debug.logVerbose("[deletePrimaryKey] sql=" + sqlBuf.toString(), module);
             try {



More information about the Svn mailing list