new MultiPropertyMapper(),
componentClass
);
final Element parentXmlMapping = xmlMapping.getParent();
final ComponentAuditingData auditData = new ComponentAuditingData();
final ReflectionManager reflectionManager = mainGenerator.getCfg().getReflectionManager();
new ComponentAuditedPropertiesReader(
ModificationStore.FULL,
new AuditedPropertiesReader.ComponentPropertiesSource( reflectionManager, component ),
auditData, mainGenerator.getGlobalCfg(), reflectionManager, ""
).read();
// Emulating first pass.
for ( String auditedPropertyName : auditData.getPropertyNames() ) {
final PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
mainGenerator.addValue(
parentXmlMapping,
component.getProperty( auditedPropertyName ).getValue(),
componentMapper,
prefix, xmlMappingData,
nestedAuditingData,
true,
true,
true
);
}
// Emulating second pass so that the relations can be mapped too.
for ( String auditedPropertyName : auditData.getPropertyNames() ) {
final PropertyAuditingData nestedAuditingData = auditData.getPropertyAuditingData( auditedPropertyName );
mainGenerator.addValue(
parentXmlMapping,
component.getProperty( auditedPropertyName ).getValue(),
componentMapper,
referencingEntityName,