I think of two ways: storing it as a string and convert it to mongoId object if necessary or store it directly as an object. Which method is preferred and why?
Asked
Active
Viewed 64 times
1
-
1`MongoId` is normally the best method, or if you dunno the other table and want a standardised object `DBRef` – Sammaye Jun 01 '13 at 20:52
-
It's best to store `ObjectID` as `ObjectID` datatype, rather than as a string. – Leonid Beschastny Jun 02 '13 at 05:38