-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
in: aggregation-frameworkAggregation framework supportAggregation framework supporttype: bugA general bugA general bug
Milestone
Description
gtomassi opened DATAMONGO-2635 and commented
When performing a search using an enum in the match
stage of an aggregation, it works as a standalone aggregation, but the exact same aggregation fails inside of a facet with multiple of them.
In a standalone aggregation, it properly serializes the enum into a string. The spring driver logs a query that looks like
{ "$match" : { "value" : { "$in" : [ "FOO" ] } } }
When the same aggregation is put inside a facet, the spring driver logs a query that looks like
{ "$match" : { "value" : { "$in" : [ { "$java" : FOO } ] } } }
Thus is it not serializing the enum in the expected way.
The underlying mongo driver then throws:
"org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class [enum class]"
Affects: 3.0.4 (Neumann SR4)
Referenced from: pull request #890
Backported to: 3.1.1 (2020.0.1)
Metadata
Metadata
Assignees
Labels
in: aggregation-frameworkAggregation framework supportAggregation framework supporttype: bugA general bugA general bug