purekid/mongodm — pull request #10 by jrschumacher (2013-10-17 12:06:21+00:00)
Title: Add mutate method to model

Add ability to mutate the data directly (i.e. use `$inc` and other MongoDB operators.) This protects data from loss where find -> mutate -> save would lose any transactions in between requests.

```php
// {... age: 16 ...}
user = User::one();
$id = $user->getId();
$age = $user->age;

$user->mutate(array('$inc' => array('age' => 1)));
// {... age: 17 ...}
```

This could have serious effects such as:

```php
// {... age: 16 ...}
$user->mutate(array('age' => 1));
// { age: 16 }
```