is it possible to get the new/updated _id after the query? example code:
$key = array( \'something\' => \'unique\' );
$data = array( \'$inc\' => array(
Just in case someone stumbles across this question like I did, Mongo will actually modify the input array when you call MongoCollection->save(); - appending the id to the end. So, if you call:
$test = array('test'=>'testing');
mongocollection->save($test);
echo $test['_id'];
You will have the mongo id for that object.