diff options
author | fangchen <fangchen@users.sourceforge.net> | 2007-10-18 00:43:02 +0000 |
---|---|---|
committer | fangchen <fangchen@users.sourceforge.net> | 2007-10-18 00:43:02 +0000 |
commit | 773d8ba8d4f9560a2ef43d7673c2515677b4ac85 (patch) | |
tree | 066f41d5cc4585b018b13c9bbf772757022a9cec /src/main/java | |
parent | 7fc50f10c33d29772d57d8c0af354eeb4eccf3ee (diff) |
Fix special handle for char to short adaption.
-This line, and those below, will be ignored--
M JDBCStorage.java
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 9 |
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();
}
}
|