HHH-2304 Wrong type detection for sql type char(x) columns
This commit is contained in:
parent
27e9957f9e
commit
c26030a27e
|
@ -633,10 +633,14 @@ public class CustomLoader extends Loader {
|
|||
int columnType = resultSetMetaData.getColumnType( columnPos );
|
||||
int scale = resultSetMetaData.getScale( columnPos );
|
||||
int precision = resultSetMetaData.getPrecision( columnPos );
|
||||
int length = precision;
|
||||
if ( columnType == 1 && precision == 0 ) {
|
||||
length = resultSetMetaData.getColumnDisplaySize( columnPos );
|
||||
}
|
||||
return factory.getTypeResolver().heuristicType(
|
||||
factory.getDialect().getHibernateTypeName(
|
||||
columnType,
|
||||
precision,
|
||||
length,
|
||||
precision,
|
||||
scale
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue