summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfangchen <fangchen@users.sourceforge.net>2007-10-18 00:43:02 +0000
committerfangchen <fangchen@users.sourceforge.net>2007-10-18 00:43:02 +0000
commit773d8ba8d4f9560a2ef43d7673c2515677b4ac85 (patch)
tree066f41d5cc4585b018b13c9bbf772757022a9cec /src
parent7fc50f10c33d29772d57d8c0af354eeb4eccf3ee (diff)
Fix special handle for char to short adaption.
-This line, and those below, will be ignored-- M JDBCStorage.java
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java
index 558f70d..d463283 100644
--- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java
+++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java
@@ -592,6 +592,15 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S>
if (adapter != null) {
Class toType = psSetMethod.getParameterTypes()[1];
mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), toType);
+ // Special case for converting character to String.
+ if (mAdapterMethods[i] == null) {
+ if (toType == String.class) {
+ mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), Character.class);
+ if (mAdapterMethods[i] == null) {
+ mAdapterMethods[i] = adapter.findAdaptMethod(jProperty.getType(), char.class);
+ }
+ }
+ }
mAdapterInstances[i] = adapter.getAdapterInstance();
}
}