diff options
Diffstat (limited to 'src/main/java/com/amazon')
-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();
}
}
|