[Question]: Is There a Reason for Different Data Types Between users._id and Other Collections in MongoDB? #1809
-
What is your question?Hello, First, I want to express my gratitude for the convenience your tool provides. Thank you very much for your hard work. I've noticed an inconsistency in the database schema where the _id field in the users collection is an Object, yet the user field in the messages collection is a String, and in the transactions collection, user is again an Object. When performing analytics, this datatype discrepancy necessitates extra type conversion, which can be somewhat inconvenient. More DetailsIs there a specific reason for these differing data types across the collections? Looking forward to your clarification. Best regards, What is the main subject of your question?Other ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @k-ishii1020, thanks for your question! It's actually a mistake. The |
Beta Was this translation helpful? Give feedback.
-
@danny-avila |
Beta Was this translation helpful? Give feedback.
Hi @k-ishii1020, thanks for your question!
It's actually a mistake. The
_id
field is native to mongo and should be ObjectId in all cases. I will review it soon, thanks for bringing it to my attention!