HHH-12212 - Derived Identifiers component column size not applied

This commit is contained in:
Andrea Boriero 2018-01-12 11:56:12 +00:00
parent c5535aa861
commit 43cae5f92a
1 changed files with 8 additions and 0 deletions

View File

@ -198,6 +198,7 @@ public class CopyIdentifierComponentSecondPass implements SecondPass {
.getName();
value.addColumn( new Column( columnName ) );
if ( joinColumn != null ) {
applyComponentColumnSizeValueToJoinColumn( column, joinColumn );
joinColumn.linkWithValue( value );
}
column.setValue( value );
@ -206,6 +207,13 @@ public class CopyIdentifierComponentSecondPass implements SecondPass {
return property;
}
private void applyComponentColumnSizeValueToJoinColumn(Column column, Ejb3JoinColumn joinColumn) {
Column mappingColumn = joinColumn.getMappingColumn();
mappingColumn.setLength( column.getLength() );
mappingColumn.setPrecision( column.getPrecision() );
mappingColumn.setScale( column.getScale() );
}
public boolean dependentUpon( CopyIdentifierComponentSecondPass other ) {
return this.referencedEntityName.equals( other.component.getOwner().getEntityName() );
}