}
private ManyToOneAttributeBinding makeManyToOneAttributeBinding(XMLManyToOneElement manyToOne,
EntityBinding entityBinding) {
ManyToOneAttributeBindingState bindingState =
new HbmManyToOneAttributeBindingState(
entityBinding.getEntity().getPojoEntitySpecifics().getClassName(),
bindingContext,
entityBinding.getMetaAttributeContext(),
manyToOne
);
// boolean (true here) indicates that by default column names should be guessed
ManyToOneRelationalState relationalState =
new HbmManyToOneRelationalStateContainer(
bindingContext,
true,
manyToOne
);
entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
ManyToOneAttributeBinding manyToOneAttributeBinding =
entityBinding.makeManyToOneAttributeBinding( bindingState.getAttributeName() )
.initialize( bindingState )
.initialize( relationalState );
return manyToOneAttributeBinding;
}