How to deep populate on mongoose
问题 I've used this article as reference, but I guess I have screwed something up. I want to deep populate the model Cart: var CartSchema = new Schema({ products: [{ product: { type: Schema.ObjectId, ref : 'Product' }, quantity: { type: Number, default: 1} }], totalItems: { type: Number, default: 0}, message: { type: String }, client: { type : Schema.ObjectId, ref : 'User' }, time: { type: Date, default: new Date()}, session: { type: String } }); So I get product.addons and product.description