Closed sergeyklay closed 1 year ago
I think I actually originally intended collection to be able to return the gridfs instance and in this case the collection name is actually the gridfs prefix. However, I admit that the gridfs functionality is only half-baked and I don't think I ever used it personally..
In current master branch PHPDoc of Mongo_Collection::collection says:
But this is wrong. Let's look at it again:
Note that the
$this->db()->db()
returns the\MongoDb
instance directly. In this case:$this->db()->db()->gridFS($this->name);
Return \MongoGridFS$this->db()->db()->selectCollection($this->name);
Return \MongoCollectiongridFS
need a prefix (by default 'fs'), rather than the collection nameIt seems Mongo_Collection::collection method returns not what was expected from him. At least in some cases
getGidFS
started with the wrong params.Also note: in some cases:
is a
Best regards : )