LOG.debugf("Unable to create auditing id mapping for entity %s, because of an unsupported Hibernate id mapping (e.g. key-many-to-one)",
entityName);
return;
}
ExtendedPropertyMapper propertyMapper = null;
String parentEntityName = null;
EntityConfiguration entityCfg = new EntityConfiguration(entityName, pc.getClassName(), idMapper, propertyMapper,
parentEntityName);
notAuditedEntitiesConfigurations.put(entityName, entityCfg);
return;
}
String entityName = pc.getEntityName();
LOG.debugf("Generating first-pass auditing mapping for entity %s", entityName);
String auditEntityName = verEntCfg.getAuditEntityName(entityName);
String auditTableName = verEntCfg.getAuditTableName(entityName, pc.getTable().getName());
// Registering the audit entity name, now that it is known
auditEntityNameRegister.register(auditEntityName);
AuditTableData auditTableData = new AuditTableData(auditEntityName, auditTableName, schema, catalog);
// Generating a mapping for the id
IdMappingData idMapper = idMetadataGenerator.addId(pc, true);
InheritanceType inheritanceType = InheritanceType.get(pc);
// These properties will be read from the mapping data
final Element class_mapping;
final ExtendedPropertyMapper propertyMapper;
final String parentEntityName;
final Triple<Element, ExtendedPropertyMapper, String> mappingData;
// Reading the mapping data depending on inheritance type (if any)