Why is there an underscore in front of the MongoDb document id ?
Why not call it "id" instead of "_id" ?
Is this part of a naming convention I'm not aware of ?
You may notice that MongoDB has a lot of functions (in the shell) and fields that start with an understore as a designation that they are internal or special and not user provided.
If you have your own "ID" then you can store it as "id" and still use the provided-by-MongoDB _id field although you are not required to use the ObjectId that MongoDB generates - you could store your own natural primary key in the "_id" field which will have a unique index on it always.
_
in front of variables to denote aprivate
orread only
attribute of a class, even though_id
is settable in insert it is read only every other time, just a wild guess there but a adds up