IdMappingData referencedIdMapping = mainGenerator.getEntitiesConfigurations()
.get(referencedEntityName).getIdMappingData();
int currentIndex = queryGeneratorBuilder == null ? 0 : queryGeneratorBuilder.getCurrentIndex();
if ("".equals(mapKey)) {
// The key of the map is the id of the entity.
return new MiddleComponentData(new MiddleMapKeyIdComponentMapper(mainGenerator.getVerEntCfg(),
referencedIdMapping.getIdMapper()), currentIndex);
} else {
// The key of the map is a property of the entity.
return new MiddleComponentData(new MiddleMapKeyPropertyComponentMapper(mapKey,
propertyAuditingData.getAccessType()), currentIndex);