int[] formnos = new int[ span ];
int l = 0;
Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
if ( valueBinding.isDerived() ) {
DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
String template = getTemplateFromString( derivedValue.getExpression(), factory );
formnos[l] = formulaTemplates.size();
colnos[l] = -1;
formulaTemplates.add( template );
forms[l] = template;
formulas.add( derivedValue.getExpression() );
formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
formulasLazy.add( lazy );
}
else {
org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );