-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Labels
Description
MongoDB\GridFS\Bucket::find()
forwards to MongoDB\GridFS\CollectionWrapper::findFiles()
which in turn forwards to MongoDB\Collection::find()
. This method creates a MongoDB\Operation\Find
command. The MongoDB\Collection
class also has a findOne
method which uses the MongoDB\Operation\FindOne
command, which is not reachable using MongoDB\GridFS\Bucket
or MongoDB\GridFS\CollectionWrapper
in the same manner.
It would be nice to have a MongoDB\Bucket::findOne()
method as well (I guess one can accomplish the same by specifying ['limit' => 1]
as an option to the find
method, but still...).
If this is something you would like to include I'd be happy to send a pull request including necessary tests and documentation.