HHH-16551 - If discriminator column type is CHAR, set length to 1
This commit is contained in:
parent
16a74b02e3
commit
8fceeaf542
|
@ -94,6 +94,10 @@ public class AnnotatedDiscriminatorColumn extends AnnotatedColumn {
|
||||||
case CHAR:
|
case CHAR:
|
||||||
column.setDiscriminatorTypeName( "character" );
|
column.setDiscriminatorTypeName( "character" );
|
||||||
column.setImplicit( false );
|
column.setImplicit( false );
|
||||||
|
if ( discriminatorColumn != null && discriminatorColumn.length() != 1 && discriminatorColumn.length() != 31 ) {
|
||||||
|
throw new AssertionFailure( "Length for CHAR discriminator should always be 1" );
|
||||||
|
}
|
||||||
|
column.setLength( 1L );
|
||||||
break;
|
break;
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
column.setDiscriminatorTypeName( "integer" );
|
column.setDiscriminatorTypeName( "integer" );
|
||||||
|
|
Loading…
Reference in New Issue