Although it is not recommended to use MongoDB for N:M relations, you could still use it that way by storing an array of IDs in the document. Therefore models could have a method which queries on the referenced ID and returns an array of objects.
Now the question: Is there a guideline whether to save the “foreign key” (oh how dare I to call it like that!) as a string or as an ObjectId object? I guess the performance will be almost equal because you don’t index on them, but maybe they don’t need equal space? What would you consider as the better way?
Simple math:
MongoDB’s ObjectId is a 12-byte binary blob.
The same data in string representation (example: ’47cc67093475061e3d95369d’) takes 24 bytes. And it also will have to be converted to ObjectId during the query.
The choice is obvious, isn’t it?