These are chat archives for Automattic/mongoose

Feb 2019
Feb 20 19:17
Good afternoon. What’s the proper schema syntax for defining a property of type ObjectId? I have userId: { type : Schema.Types.ObjectId, required: true, ref: 'User’ } but get the error Schema is not defined. I’m importing mongoose via var mongoose = require('mongoose’); so I guess I need mongoose.Schema.Types.ObjectId
is that accurate?
David Ferguson
Feb 20 23:56