My query using ReactiveMongo:
collection
.find(
Json.obj("relateds" -> Json.obj("$elemMatch" -> activityRelated)),
Json.obj("subscriberId" -> 1, "_id" -> 0)
)
.cursor[BSONObjectID]
.collect[Seq]()
This is meant to return only one field "subscriberId" for each found document. The final output type should be Future[Seq[BSONObjectID]]
But it fails with:
Failure(java.lang.RuntimeException: JsError(List((,List(ValidationError(unhandled json value,WrappedArray()))))))
Any Ideas how to do this ?
Thanks in advance