You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I found an issue in aggregateStream method on MongoTemplate. If you use a local variable ($$variable_name) for example in filter operator then it is not able to resolve this local variable name and throws:
org.springframework.data.mapping.context.InvalidPersistentPropertyPath: No property '$$localvar' found on class ***.TraceEntity! Did you mean: ?
at org.springframework.data.mapping.context.PersistentPropertyPathFactory.createPersistentPropertyPath(PersistentPropertyPathFactory.java:205)
at org.springframework.data.mapping.context.PersistentPropertyPathFactory.lambda$getPersistentPropertyPath$1(PersistentPropertyPathFactory.java:172)
...
Everything works fine with the aggregate method. I think the issue is in the aggregation context because aggregateStream uses TypeBasedAggregationOperationContext and aggregate uses RelaxedTypeBasedAggregationOperationContext. Which is weird I would excepted the same aggregation context type.
I use spring-data-mongodb 3.3.4 but I also checked the latest version (4.0.0-SNAPSHOT) and there is also the same aggregation context in the aggregateStream. So I assume the latest version is also affected.
The text was updated successfully, but these errors were encountered:
Hello
I found an issue in
aggregateStream
method onMongoTemplate
. If you use a local variable ($$variable_name
) for example in filter operator then it is not able to resolve this local variable name and throws:Everything works fine with the
aggregate
method. I think the issue is in the aggregation context becauseaggregateStream
usesTypeBasedAggregationOperationContext
andaggregate
usesRelaxedTypeBasedAggregationOperationContext
. Which is weird I would excepted the same aggregation context type.Here is an example:
MyEntity:
Aggregation
I use spring-data-mongodb
3.3.4
but I also checked the latest version (4.0.0-SNAPSHOT
) and there is also the same aggregation context in theaggregateStream
. So I assume the latest version is also affected.The text was updated successfully, but these errors were encountered: