let's assume I do this:
$person = array(
"_id" => new MongoId(),
"name" => "Fabs",
"city" => "Rome"
);
$people->save($person);
Can I be sure of the fact _id
will be unique when $person
is actually persisted? Because, after all, the id has been created "outside" of the DB (without the DB knowing) and there might well be that very id in the people
collection already, no? I also understand it might be very unlikely but is it possible at all?