is it possible to get the new/updated _id after the query? example code:
$key = array( \'something\' => \'unique\' );
$data = array( \'$inc\' => array(
You can also set fsync to true in an update/upsert, to get the _id returned to the object that has been passed to the update.
$save = array ('test' => 'work');
$m->$collection->update(criteria, $save, array('fsync' => true, 'upsert' => true));
echo $save['_id']; //should have your _id of the obj just updated.