I have one collection, with the id of the documents set as MongoDb Object Ids (so appear in the db as:
Collection1
"someId": {
"$oid": "5003cb802e28076412000001"
},
In another collection, I am referencing these. However sometimes these references appear to be stored as proper oids:
Collection 2
"someForiegnId": {
"$oid": "5003cb802e28076412000001"
},
But other times they have made it into the db as a normal string.
Collection 2
"someForiegnId": "5003cb802e28076412000001",
My question is - Is is important to store these foreign references in the oid format, or can they just be strings?