3333import org .hibernate .type .EntityType ;
3434import org .hibernate .type .Type ;
3535import org .hibernate .type .descriptor .JdbcTypeNameMapper ;
36- import org .hibernate .type .descriptor .java .JavaTypeHelper ;
3736import org .hibernate .type .descriptor .jdbc .JdbcType ;
3837import org .hibernate .type .descriptor .sql .DdlType ;
3938import org .hibernate .type .descriptor .sql .spi .DdlTypeRegistry ;
4443import static org .hibernate .internal .util .StringHelper .lastIndexOfLetter ;
4544import static org .hibernate .internal .util .StringHelper .nullIfEmpty ;
4645import static org .hibernate .internal .util .StringHelper .safeInterning ;
46+ import static org .hibernate .type .descriptor .java .JavaTypeHelper .isTemporal ;
4747
4848/**
4949 * A mapping model object representing a {@linkplain jakarta.persistence.Column column}
@@ -311,7 +311,7 @@ public int getSqlTypeCode(Mapping mapping) throws MappingException {
311311 private String getSqlTypeName (DdlTypeRegistry ddlTypeRegistry , Dialect dialect , Mapping mapping ) {
312312 if ( sqlTypeName == null ) {
313313 final int typeCode = getSqlTypeCode ( mapping );
314- final DdlType descriptor = ddlTypeRegistry .getDescriptor ( getSqlTypeCode ( mapping ) );
314+ final DdlType descriptor = ddlTypeRegistry .getDescriptor ( typeCode );
315315 if ( descriptor == null ) {
316316 throw new MappingException (
317317 String .format (
@@ -455,7 +455,7 @@ Size calculateColumnSize(Dialect dialect, Mapping mapping) {
455455 }
456456 if ( type instanceof BasicType ) {
457457 final BasicType <?> basicType = (BasicType <?>) type ;
458- if ( JavaTypeHelper . isTemporal ( basicType .getExpressibleJavaType () ) ) {
458+ if ( isTemporal ( basicType .getExpressibleJavaType () ) ) {
459459 precisionToUse = getTemporalPrecision ();
460460 lengthToUse = null ;
461461 scaleToUse = null ;
@@ -465,7 +465,7 @@ Size calculateColumnSize(Dialect dialect, Mapping mapping) {
465465 throw new AssertionFailure ( "no typing information available to determine column size" );
466466 }
467467 final JdbcMapping jdbcMapping = (JdbcMapping ) type ;
468- Size size = dialect .getSizeStrategy ().resolveSize (
468+ final Size size = dialect .getSizeStrategy ().resolveSize (
469469 jdbcMapping .getJdbcType (),
470470 jdbcMapping .getJdbcJavaType (),
471471 precisionToUse ,
0 commit comments