Hi Allard,
I’m trying to read events from mongo event store with payloadType in list of classes.
I tried to use MongoCriteriaBuilder but it seems the MongoProperty.in(Object) cannot help me create query like the following:
{“payloadType”: {
“$in”: [
“com.my.package.MyEvent”,
“com.my.package.MyOtherEvent”
]
}}
I’m not a Mongo expert, so my assumption is that new BasicDBObject(operator, expression.toString()) () interprets value as a single value adding quotes. So I have the something like the following as the result:
{“payloadType”: {
“$in”: “[
“com.my.package.MyEvent”,
“com.my.package.MyOtherEvent”
]”
}}