HHH-14623 Do not try to audit non-insertable, non-updateable component properties
This commit is contained in:
parent
4859be84c1
commit
0ee23ce116
|
@ -343,7 +343,10 @@ public final class AuditMetadataGenerator {
|
|||
// Verifies if a mapping exists using a @JoinColumn against a @NaturalId field
|
||||
// and if so, this eliminates the mapping property as it isn't needed.
|
||||
if ( property instanceof SyntheticProperty ) {
|
||||
if ( property.getValue().isAlternateUniqueKey() ) {
|
||||
if ( property.getValue().isAlternateUniqueKey() ||
|
||||
// HHH-14263
|
||||
// If synthetic property is non-insertable, non-updatable, then no need to audit it
|
||||
!(property.isInsertable() || property.isUpdateable()) ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,10 +263,7 @@ public class AuditedPropertiesReader {
|
|||
final Property property = propertyIter.next();
|
||||
addPersistentProperty( property );
|
||||
// See HHH-6636
|
||||
if ( "embedded".equals( property.getPropertyAccessorName() )
|
||||
&& !PropertyPath.IDENTIFIER_MAPPER_PROPERTY.equals( property.getName() )
|
||||
&& (property.isInsertable() || property.isUpdateable())
|
||||
) {
|
||||
if ( "embedded".equals( property.getPropertyAccessorName() ) && !PropertyPath.IDENTIFIER_MAPPER_PROPERTY.equals( property.getName() ) ) {
|
||||
createPropertiesGroupMapping( property );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue