I am trying reference another object in a model in node,
User = new Schema({ username: { type: String, index: {unique: true}
I found out the answer to my own question here it is.
User = new Schema({ username: { type: String, index: {unique: true} } }); Idea = new Schema({ Creator: { type: Schema.ObjectId, ref: 'User' } });