DATAMONGO-2153 - Fix domain type field mapping for change stream aggregations.

We now make sure to call the delegate AggregationOperationContext without potentially overriding arguments. Without this change potentially registered target types would be overridden with null.
This commit is contained in:
Christoph Strobl
2019-05-20 10:09:26 +02:00
parent 4ab61bd4d4
commit b48ff3c38b
2 changed files with 18 additions and 0 deletions

View File

@@ -43,6 +43,15 @@ class NestedDelegatingExpressionAggregationOperationContext implements Aggregati
this.delegate = referenceContext;
}
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationOperationContext#getMappedObject(org.bson.Document)
*/
@Override
public Document getMappedObject(Document document) {
return delegate.getMappedObject(document);
}
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationOperationContext#getMappedObject(org.bson.Document, java.lang.Class)

View File

@@ -55,6 +55,15 @@ public class PrefixingDelegatingAggregationOperationContext implements Aggregati
this.blacklist = new HashSet<>(blacklist);
}
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationOperationContext#getMappedObject(org.bson.Document)
*/
@Override
public Document getMappedObject(Document document) {
return doPrefix(delegate.getMappedObject(document));
}
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationOperationContext#getMappedObject(org.bson.Document, java.lang.Class)