// the cycle to process embeddable classes and their accessors. See
// MetadataProject processStage3(), processEmbeddableMappingAccessors.
// At this stage all class accessors (embeddable, entity and mapped
// superclass) have to have been processed to gather all their
// relational and embedded mappings.
EmbeddableAccessor mapKeyAccessor = getProject().getEmbeddableAccessor(mapKeyClass);
// Ensure the reference descriptor is marked as an embeddable collection.
mapKeyAccessor.getDescriptor().setIsEmbeddable();
// Process the attribute overrides for this may key embeddable.
processAttributeOverrides(mappedKeyMapAccessor.getMapKeyAttributeOverrides(), keyMapping, mapKeyAccessor.getDescriptor());
// Process the association overrides for this may key embeddable.
processAssociationOverrides(mappedKeyMapAccessor.getMapKeyAssociationOverrides(), keyMapping, mapKeyAccessor.getDescriptor());
keyMapping.setDescriptor(getDescriptor().getClassDescriptor());
return keyMapping;
}