I make a "copy" of MySQL table in MongoDB for PHP application. And I have id column which is PRIMARY KEY. Should I store it in mongodb as:
['_id' => (string) $id]
or
['_id' => (int) $id]
or
['_id' => new \MongoId($id)]
or
['_id' => new \MongoId, 'id' => $id]
I don't plan on having more than one machine for mongodb or making a lot of queries by that ID alone.
What is the difference in using string, integer or ObjectId here?