From dcee382e762e1ed8bef1083fa2a449252fb57027 Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 26 Dec 2013 17:39:48 +0200 Subject: [PATCH] Mongo README.md updated. --- extensions/yii/mongodb/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/yii/mongodb/README.md b/extensions/yii/mongodb/README.md index d56e030..28e110d 100644 --- a/extensions/yii/mongodb/README.md +++ b/extensions/yii/mongodb/README.md @@ -65,11 +65,13 @@ class Customer extends ActiveRecord */ public function attributes() { - return ['name', 'email', 'address', 'status']; + return ['_id', 'name', 'email', 'address', 'status']; } } ``` +Note: collection primary key name ('_id') should be always explicitly setup as an attribute. + You can use [[\yii\data\ActiveDataProvider]] with [[\yii\mongodb\Query]] and [[\yii\mongodb\ActiveQuery]]: ```php @@ -102,3 +104,8 @@ $models = $provider->getModels(); This extension supports [MongoGridFS](http://docs.mongodb.org/manual/core/gridfs/) via classes under namespace "\yii\mongodb\file". + +This extension supports logging and profiling, however log messages does not contain +actual text of the performed queries, they contains only a “close approximation” of it +composed on the values which can be extracted from PHP Mongo extension classes. +If you need to see actual query text, you should use specific tools for that. \ No newline at end of file