if ( ColumnSource.class.isInstance( valueSource ) ) {
final ColumnSource columnSource = ColumnSource.class.cast( valueSource );
final Column column = makeColumn( (ColumnSource) valueSource, table );
valueBindings.add(
new SimpleValueBinding(
column,
columnSource.isIncludedInInsert(),
columnSource.isIncludedInUpdate()
)
);
}
else {
valueBindings.add(
new SimpleValueBinding(
makeDerivedValue( ( (DerivedValueSource) valueSource ), table )
)
);
}
}
}
else {
String name = metadata.getOptions()
.getNamingStrategy()
.propertyToColumnName( attributeBinding.getAttribute().getName() );
name = quoteIdentifier( name );
Column column = attributeBinding.getContainer()
.seekEntityBinding()
.getPrimaryTable()
.locateOrCreateColumn( name );
column.setNullable( relationalValueSourceContainer.areValuesNullableByDefault() );
valueBindings.add(
new SimpleValueBinding(
column,
relationalValueSourceContainer.areValuesIncludedInInsertByDefault(),
relationalValueSourceContainer.areValuesIncludedInUpdateByDefault()
)
);