summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2014-05-19 15:39:27 -0700
committerJesse Morgan <jesse@jesterpm.net>2014-05-19 15:39:27 -0700
commitff22ef4ac4dc44d3824230c760b87cbcbf8ae64a (patch)
treef783f4cacdedcd342f3688ac6fbc0e8d0740f441 /src/main/java/com/amazon/carbonado/repo
parent623ffa8d9336817fc20cd913b10ce7b11c07ed6c (diff)
parent40c41de1e897b5167384230574ac96ea002ef8ac (diff)
Merge pull request #1 from architjain/master
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/amazon/carbonado/repo')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java8
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 {