cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skolbac...@apache.org
Subject cayenne git commit: fix ReturnTypesMappingIT.testNCLOB
Date Wed, 11 Feb 2015 12:16:05 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 257b1eb56 -> fb8686d40


fix ReturnTypesMappingIT.testNCLOB


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/fb8686d4
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/fb8686d4
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/fb8686d4

Branch: refs/heads/master
Commit: fb8686d40e2f7790937aa8758b70d60627e6e9e2
Parents: 257b1eb
Author: Savva Kolbachev <s.kolbachev@gmail.com>
Authored: Wed Feb 11 15:14:01 2015 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Wed Feb 11 15:14:01 2015 +0300

----------------------------------------------------------------------
 .../main/java/org/apache/cayenne/access/types/CharType.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/fb8686d4/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java b/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
index fcf6904..b3aff54 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
@@ -19,6 +19,8 @@
 
 package org.apache.cayenne.access.types;
 
+import org.apache.cayenne.CayenneException;
+
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringWriter;
@@ -29,8 +31,6 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
 
-import org.apache.cayenne.CayenneException;
-
 /**
  * Handles <code>java.lang.String</code>, mapping it as either of JDBC types
- CLOB or
  * (VAR)CHAR. Can be configured to trim trailing spaces.
@@ -111,7 +111,7 @@ public class CharType implements ExtendedType {
 
         // if this is a CLOB column, set the value as "String"
         // instead. This should work with most drivers
-        if (type == Types.CLOB) {
+        if (type == Types.CLOB || type == Types.NCLOB) {
             st.setString(pos, (String) value);
         } else if (scale != -1) {
             st.setObject(pos, value, type, scale);


Mime
View raw message