Skip to content

Commit

Permalink
Merge pull request Carbonado#1 from architjain/master
Browse files Browse the repository at this point in the history
Fix to select right datatype if DECIMAL_DIGITS for a column is less than 0 for a oracle database.
  • Loading branch information
jesterpm committed May 19, 2014
2 parents 623ffa8 + 40c41de commit ff22ef4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,14 +754,14 @@ private static Log getLog() {
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 {
Expand All @@ -774,14 +774,14 @@ private static Log getLog() {
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 {
Expand Down

0 comments on commit ff22ef4

Please sign in to comment.