svn commit: r960929 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r960929 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java

adrianc
Author: adrianc
Date: Tue Jul  6 16:08:51 2010
New Revision: 960929

URL: http://svn.apache.org/viewvc?rev=960929&view=rev
Log:
Fixed a bug in JdbcValueHandler.java reported by Hans on the dev ml - PostgreSQL BYTEA SQL types threw an exception. This fix replaces the entityengine.xml datasource use-binary-type-for-blob attribute introduced in rev 431161. In other words, the use-binary-type-for-blob attribute is no longer needed.


Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java?rev=960929&r1=960928&r2=960929&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java Tue Jul  6 16:08:51 2010
@@ -123,6 +123,8 @@ public abstract class JdbcValueHandler {
         result.put("CHAR VARYING", Types.VARCHAR);
         result.put("CHARACTER VARYING", Types.VARCHAR);
         // DB2, MS SQL Data Types
+        // Note: Do NOT map the DATETIME SQL data type, the
+        // java-type will be used to select the correct data type
         result.put("LONGVARCHAR", Types.LONGVARCHAR);
         result.put("LONG VARCHAR", Types.LONGVARCHAR);
         result.put("BIGINT", Types.BIGINT);
@@ -132,8 +134,8 @@ public abstract class JdbcValueHandler {
         result.put("VARBINARY", Types.VARBINARY);
         result.put("LONGVARBINARY", Types.LONGVARBINARY);
         result.put("LONG VARBINARY", Types.LONGVARBINARY);
-        // Note: Do NOT map the DATETIME SQL data type, the
-        // java-type will be used to select the correct data type
+        // PostgreSQL SQL Data Types
+        result.put("BYTEA", Types.BINARY);
         return result;
     }