Quantcast
Channel: Mongoose model seperations - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by twcardenas for Mongoose model seperations

Yes, you should seperate them. To link them you would just put the profile schema Id as a field on the other models. const profileSchema = new Schema({ userId: Schema.Types.ObjectId }) const...

View Article



Mongoose model seperations

Im new to node and mongodb. I have the following mongoose model. import { model, Schema } from 'mongoose'; import Joi from '@hapi/joi'; const profileSchema = new Schema({ user: { type:...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images