php-mongo
php-mongo copied to clipboard
MongoDB ODM. Part of @PHPMongoKit
These error cause when i try to run following code: ``` php $collection = $this->getClient()->getDatabase($this->db)->getCollection('messages'); $pipeline = $collection->createAggregator()->setBatchSize(100)->group(array('_id' => '$channelId', 'sum' => array('$sum' => 1))); $result = $collection->aggregate($pipeline, array(), false);...
Useful to prevent insertion of array where string must be set or to add query or update operators
Currently Document::validate calls if first argument of Document::save passed to true. It throws exception. There is reason allowing scenario when document silently validated, and resulot obtainded from Document::getErrors
Remove Document::save validation argument, configure validation on save automaticaly from mapping or by setter.
How do I validate sub document field? for example if I have document like this: ```javascript { "name": "John", "email": "[email protected]", "addresses": [ { "street": "field required", "locality": "", "city":...
This will help correctly hidrate document from php's array, and convert fields before save