Closed berkan-sahin closed 3 years ago
It seems like using the IDs generated by mongo is not a bad idea after all, because as @vedattt pointed out our model classes are created on-demand based on DB queries, and therefore having a null ID field is not a concern.
Most of our model classes require a method to uniquely identify them for reliable querying and aggregation, but our current solution (using mongodb internal id's) is insufficient as these IDs are not generated during instantiation. One solution is to use a separate ID field, which is actually a somewhst common practice.