diff --git a/reference/mongo/mongocollection/save.xml b/reference/mongo/mongocollection/save.xml index 06a12ef273..010307dfac 100644 --- a/reference/mongo/mongocollection/save.xml +++ b/reference/mongo/mongocollection/save.xml @@ -124,6 +124,7 @@ $obj = array('x' => 1); // insert $obj into the db $collection->save($obj); +var_dump($obj); // add another field $obj['foo'] = 'bar'; @@ -137,9 +138,34 @@ $collection->save($obj); ?> ]]> + &example.outputs.similar; + + + int(1) + ["_id"]=> + object(MongoId)#4 (1) { + ["$id"]=> + string(24) "50b6afe544415ed606000000" + } +} +]]> + + + &reftitle.notes; + + + This method will create an _id field in the + a array with a pregenerated ID if the field didn't + exist already - unless the argument was a reference. + + + +