From 3e139db6bb9f908ba0a992e42d2663f64e74539a Mon Sep 17 00:00:00 2001 From: quasi Date: Sat, 30 Apr 2011 17:57:25 +0000 Subject: [PATCH] =?UTF-8?q?Anpassungen=20am=20JDC-Treiber=20Setup,=20so=20?= =?UTF-8?q?da=C3=9F=20das=20Persistence=20mit=20PostgreSQL=20>=208.2=20zus?= =?UTF-8?q?ammen=20arbeitet.=20Haupts=C3=A4chlich=20verantwortlich=20schei?= =?UTF-8?q?nt=20daf=C3=BCr=20die=20Einstellung=20stringtype=20wichtig=20zu?= =?UTF-8?q?=20sein.=20Durch=20Umstellen=20von=20"varchar"=20(default)=20au?= =?UTF-8?q?f=20"unspecified"=20wird=20das=20alte=20Verhalten=20von=20Postg?= =?UTF-8?q?resQL=20<=3D=208.2=20simuliert.=20Persistence=20verl=C3=A4?= =?UTF-8?q?=C3=9Ft=20sich=20darauf,=20da=C3=9F=20die=20gebundenen=20Parame?= =?UTF-8?q?ter=20automatisch=20konvertiert=20werden,=20was=20bei=20Postgre?= =?UTF-8?q?SQL=20>=208.2=20nicht=20mehr=20funktioniert,=20wenn=20diese=20O?= =?UTF-8?q?ption=20nicht=20gesetzt=20ist.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@883 8810af33-2d31-482b-a856-94f89814c4df --- ccm-core/src/com/arsdigita/util/jdbc/Connections.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ccm-core/src/com/arsdigita/util/jdbc/Connections.java b/ccm-core/src/com/arsdigita/util/jdbc/Connections.java index 29db325b3..7d88afae0 100755 --- a/ccm-core/src/com/arsdigita/util/jdbc/Connections.java +++ b/ccm-core/src/com/arsdigita/util/jdbc/Connections.java @@ -27,6 +27,7 @@ import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.Statement; import java.sql.SQLException; +import java.util.Properties; import org.apache.log4j.Logger; /** @@ -65,7 +66,10 @@ public final class Connections { break; } - final Connection conn = DriverManager.getConnection(url); + Properties props = new Properties(); + props.setProperty("stringtype", "unspecified"); + + final Connection conn = DriverManager.getConnection(url, props); Assert.exists(conn, Connection.class);