private void collectAttributeDefinitions(
Map<String,AttributeDefinition> attributeDefinitionsByName,
EntityMetamodel metamodel) {
for ( int i = 0; i < metamodel.getPropertySpan(); i++ ) {
final AttributeDefinition attributeDefinition = metamodel.getProperties()[i];
// Don't replace an attribute definition if it is already in attributeDefinitionsByName
// because the new value will be from a subclass.
final AttributeDefinition oldAttributeDefinition = attributeDefinitionsByName.get(
attributeDefinition.getName()
);
if ( oldAttributeDefinition != null ) {
if ( LOG.isTraceEnabled() ) {
LOG.tracef(