0

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)?

Matthias Langer
  • 994
  • 8
  • 22

1 Answers1

0

An empty document will perform a find all eg:

coll.find(MongoDBObject(), projection)
Ross
  • 17,861
  • 2
  • 55
  • 73