make a code comment even clearer b/c apparently some don't get it

This commit is contained in:
Gavin 2023-04-06 10:56:19 +02:00
parent 2927c006b2
commit 1b2107e7b4
1 changed files with 7 additions and 4 deletions

View File

@ -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 ) {