diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java index 088a0b609d..a22e361ff3 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java @@ -737,11 +737,14 @@ public class OracleDialect extends Dialect { // range of values of a NUMBER(3,0) or NUMBER(5,0) just // doesn't really match naturally. if ( precision <= 10 ) { - // A NUMBER(10,0) might not fit in a 32-bit integer, + // We map INTEGER to NUMBER(10,0), so we should also + // map NUMBER(10,0) back to INTEGER. (In principle, + // a NUMBER(10,0) might not fit in a 32-bit integer, // but it's still pretty safe to use INTEGER here, - // since we can assume the most likely reason to find - // a column of type NUMBER(10,0) in an Oracle database - // is that it's intended to store an integer. + // since we can safely assume that the most likely + // reason to find a column of type NUMBER(10,0) in + // an Oracle database is that it's intended to store + // an integer.) return jdbcTypeRegistry.getDescriptor( INTEGER ); } else if ( precision <= 19 ) {