diff options
author | Archit Jain <architj@amazon.com> | 2014-05-20 03:52:26 +0530 |
---|---|---|
committer | Archit Jain <architj@amazon.com> | 2014-05-20 03:52:26 +0530 |
commit | 40c41de1e897b5167384230574ac96ea002ef8ac (patch) | |
tree | f783f4cacdedcd342f3688ac6fbc0e8d0740f441 /src/main/java/com | |
parent | 623ffa8d9336817fc20cd913b10ce7b11c07ed6c (diff) |
Fix to select right datatype if DECIMAL_DIGITS for a column is less than 0 for a oracle database.
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java index 423861d..f609483 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java @@ -754,14 +754,14 @@ public class JDBCStorableIntrospector extends StorableIntrospector { case NUMERIC:
case DECIMAL:
if (desiredClass == int.class) {
- if (decimalDigits == 0) {
+ if (decimalDigits <= 0) {
actualClass = int.class;
suffix = "Int";
} else {
return null;
}
} else if (desiredClass == long.class) {
- if (decimalDigits == 0) {
+ if (decimalDigits <= 0) {
actualClass = long.class;
suffix = "Long";
} else {
@@ -774,14 +774,14 @@ public class JDBCStorableIntrospector extends StorableIntrospector { actualClass = BigDecimal.class;
suffix = "BigDecimal";
} else if (desiredClass == short.class) {
- if (decimalDigits == 0) {
+ if (decimalDigits <= 0) {
actualClass = short.class;
suffix = "Short";
} else {
return null;
}
} else if (desiredClass == byte.class) {
- if (decimalDigits == 0) {
+ if (decimalDigits <= 0) {
actualClass = byte.class;
suffix = "Byte";
} else {
|