openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r755304 - in /openjpa/branches/1.3.x/openjpa-jdbc/src/main: java/org/apache/openjpa/jdbc/sql/OracleDictionary.java resources/org/apache/openjpa/jdbc/sql/localizer.properties
Date Tue, 17 Mar 2009 16:21:23 GMT
Author: mikedd
Date: Tue Mar 17 16:21:22 2009
New Revision: 755304

URL: http://svn.apache.org/viewvc?rev=755304&view=rev
Log:
OPENJPA-811 merge Dinkar's patch to 1.3.x

Modified:
    openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties

Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=755304&r1=755303&r2=755304&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Tue Mar 17 16:21:22 2009
@@ -51,6 +51,7 @@
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.StoreException;
+import org.apache.openjpa.util.UserException;
 
 import serp.util.Numbers;
 
@@ -501,6 +502,9 @@
     public void setNull(PreparedStatement stmnt, int idx, int colType,
         Column col)
         throws SQLException {
+        if ((colType == Types.CLOB || colType == Types.BLOB) && col.isNotNull())
+            throw new UserException(_loc.get("null-blob-in-not-nullable", col
+                .getFullName()));
         if (colType == Types.BLOB && _driverBehavior == BEHAVE_ORACLE)
             stmnt.setBlob(idx, getEmptyBlob());
         else if (colType == Types.CLOB && _driverBehavior == BEHAVE_ORACLE

Modified: openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?rev=755304&r1=755303&r2=755304&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
(original)
+++ openjpa/branches/1.3.x/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
Tue Mar 17 16:21:22 2009
@@ -185,4 +185,6 @@
 	database allows maximum {2}-character for a constraint name. 
 long-seq-name: Sequence name "{0}" is {1}-character long. The database allows \
 	maximum {2}-character for a sequence name. 
-	
\ No newline at end of file
+null-blob-in-not-nullable: Can not set null value on column "{0}" \
+	because the corresponding field is set to be non-nullable.
+



Mime
View raw message