You can use 0.12-RC3
val pipeline = BSONDocument(
"aggregate" -> "orders",
"pipeline" -> BSONArray(
BSONDocument(
"$unwind" -> "$specs"
),
BSONDocument(
"$lookup" ->
BSONDocument(
"from" -> "inventory",
"localField" -> "specs",
"foreignField" -> "size",
"foreignField" -> "inventory_docs"
)
),
BSONDocument(
"$match" -> BSONDocument("inventory_docs" -> BSONDocument("$ne" -> BSONArray()))
)
)
)
val runner = Command.run(BSONSerializationPack)
for {
result <- runner.apply(collection.db, runner.rawCommand(pipeline)).one[BSONDocument]
} yield {
read(result).head[BSONDocument]
}
Oh, thanks for the hint!
- Reto
--
You received this message because you are subscribed to a topic in the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reactivemongo/voogDEBfxrA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reactivemong...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.