Is there any benefit to storing an id to a related document as an ObjectId versus storing it as a string literal?
Using ObjectID:
{
\"_id\": Objec
In addition, ObjectId() has the following attribute and methods that you can use.
str - Returns the hexadecimal string representation of the object.
as a Date.
ObjectId.toString() # Returns the JavaScript representation.
ObjectId.getTimestamp() # Returns the timestamp portion of the object
ObjectId.valueOf() # Returns the representation of the object as a hexadecimal string