HHH-16094 HHH-17097 MySQL schema generation and validation : tinytext instead of longtext for @Lob
This commit is contained in:
parent
58b5cea899
commit
8f9d1a15ad
|
@ -152,6 +152,16 @@ public class MySQLDialect extends Dialect {
|
||||||
//we set scale > 20
|
//we set scale > 20
|
||||||
size.setScale( Math.min( size.getPrecision(), 20 ) );
|
size.setScale( Math.min( size.getPrecision(), 20 ) );
|
||||||
return size;
|
return size;
|
||||||
|
case BLOB:
|
||||||
|
case NCLOB:
|
||||||
|
case CLOB:
|
||||||
|
return super.resolveSize(
|
||||||
|
jdbcType,
|
||||||
|
javaType,
|
||||||
|
precision,
|
||||||
|
scale,
|
||||||
|
length == null ? getDefaultLobLength() : length
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return super.resolveSize( jdbcType, javaType, precision, scale, length );
|
return super.resolveSize( jdbcType, javaType, precision, scale, length );
|
||||||
}
|
}
|
||||||
|
@ -524,8 +534,7 @@ public class MySQLDialect extends Dialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDefaultLobLength() {
|
public long getDefaultLobLength() {
|
||||||
//max length for mediumblob or mediumtext
|
return Integer.MAX_VALUE;
|
||||||
return 16_777_215;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue