Assuming that coll
is a MongoCollection, I know that I can select all documents by calling coll.find()
, and I know that I can apply a projection to all documents by calling coll.find("_id" $exists true, projection)
where projection
might be something like MongoDBObject("_id" -> 1)
. Is there a way to do this more elegantly, like (just imagined) coll.find($everything, projection)
?
Asked
Active
Viewed 268 times
0

Matthias Langer
- 994
- 8
- 22
1 Answers
0
An empty document will perform a find all eg:
coll.find(MongoDBObject(), projection)

Ross
- 17,861
- 2
- 55
- 73