HHH-9199 - Fixed auditing of embeddable collections using ValidityAuditStrategy.
(cherry picked from commita17dd125e7
) Conflicts: hibernate-envers/src/main/java/org/hibernate/envers/strategy/ValidityAuditStrategy.java (cherry picked from commit815a0a81c2
)
This commit is contained in:
parent
e033f028c2
commit
d1176ce72e
|
@ -246,10 +246,13 @@ public class ValidityAuditStrategy implements AuditStrategy {
|
|||
);
|
||||
final String revisionFieldName = enversService.getAuditEntitiesConfiguration().getRevisionFieldName();
|
||||
final String revisionTypePropName = enversService.getAuditEntitiesConfiguration().getRevisionTypePropName();
|
||||
final String ordinalPropName = enversService.getAuditEntitiesConfiguration().getEmbeddableSetOrdinalPropertyName();
|
||||
|
||||
// Adding a parameter for each id component, except the rev number and type.
|
||||
for ( Map.Entry<String, Object> originalIdEntry : originalId.entrySet() ) {
|
||||
if ( !revisionFieldName.equals( originalIdEntry.getKey() ) && !revisionTypePropName.equals( originalIdEntry.getKey() ) ) {
|
||||
if ( !revisionFieldName.equals( originalIdEntry.getKey() )
|
||||
&& !revisionTypePropName.equals( originalIdEntry.getKey() )
|
||||
&& !ordinalPropName.equals( originalIdEntry.getKey() ) ) {
|
||||
qb.getRootParameters().addWhereWithParam(
|
||||
originalIdPropName + "." + originalIdEntry.getKey(),
|
||||
true, "=", originalIdEntry.getValue()
|
||||
|
|
Loading…
Reference in New Issue