DATAMONGO-2565 - Evaluate correct expression when obtaining collation from MongoPersistentEntity.

Original pull request: #869.
This commit is contained in:
BraveLeeLee
2020-06-10 15:03:21 +08:00
committed by Mark Paluch
parent a2e5009f42
commit 5e378bd21b

View File

@@ -140,7 +140,7 @@ public class BasicMongoPersistentEntity<T> extends BasicPersistentEntity<T, Mong
@Override
public org.springframework.data.mongodb.core.query.Collation getCollation() {
Object collationValue = collationExpression != null ? expression.getValue(getEvaluationContext(null), String.class)
Object collationValue = collationExpression != null ? collationExpression.getValue(getEvaluationContext(null), String.class)
: this.collation;
if (collationValue == null) {