cs102-project / LabConnect

LabConnect facilitates communication between students, TA's, tutors, and instructors.
http://labconnect.me
GNU Affero General Public License v3.0
6 stars 0 forks source link

Unique IDs for model classes #14

Closed berkan-sahin closed 3 years ago

berkan-sahin commented 3 years ago

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.

berkan-sahin commented 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.