Issue Tracker- Mongoose documents, best approach?

Hello, im writing my advanced Node Issue Tracker Project and i have a concept issue regarding how to structure my Mongoose database/documents.
There are two main models/documents to consider- Issue objects, which contain various data and Projects, which are more or less arrays of issue objects. How can i create Issue documents and then reference them inside their respective Projects? Is Mongoose Model.populate method the right approach and utilizing its ref option?
My initial approach(without using populate which im unfamiliar with) was to create two models, one for Projects and for for Issues and whenever i create an Issue, i push it inside its respective Project array, but i realized this practically created two instances of the same Issue, one inside its model collection and one inside its Project, which is obviously quite unpractical.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.