From d5ef5d1f3db5251683f1888da5353fb765584fe2 Mon Sep 17 00:00:00 2001 From: Patrick Linskey Date: Tue, 7 Aug 2007 00:16:08 +0000 Subject: [PATCH] OPENJPA-308 git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@563355 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/jdbc/sql/PostgresDictionary.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java index e370d0cfa..9dcc4b362 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java @@ -23,6 +23,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.sql.Types; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -230,6 +231,15 @@ public class PostgresDictionary stmnt.setBoolean(idx, val); } + public void setNull(PreparedStatement stmnt, int idx, int colType, + Column col) + throws SQLException { + // OPENJPA- + if (colType == Types.BLOB) + colType = Types.BINARY; + stmnt.setNull(idx, colType); + } + protected void appendSelectRange(SQLBuffer buf, long start, long end) { if (end != Long.MAX_VALUE) buf.append(" LIMIT ").appendValue(end - start);