openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r723088 - in /openjpa/trunk/openjpa-jdbc/src/main: java/org/apache/openjpa/jdbc/sql/OracleDictionary.java resources/org/apache/openjpa/jdbc/sql/localizer.properties
Date Wed, 03 Dec 2008 21:41:54 GMT
Author: allee8285
Date: Wed Dec  3 13:41:54 2008
New Revision: 723088

URL: http://svn.apache.org/viewvc?rev=723088&view=rev
Log:
OPENJPA-811 - Committ on behalf of Pinaki Poddar and Dinkar Rao.

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

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=723088&r1=723087&r2=723088&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Wed Dec  3 13:41:54 2008
@@ -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/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties?rev=723088&r1=723087&r2=723088&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/sql/localizer.properties
Wed Dec  3 13:41:54 2008
@@ -184,5 +184,6 @@
 long-constraint-name: Constraint name "{0}" is {1}-character long. The \
 	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
+	maximum {2}-character for a sequence name.
+null-blob-in-not-nullable: Can not set null value on column "{0}" \
+	because the corresponding field is set to be non-nullable.
\ No newline at end of file



Mime
View raw message