mongoose populate field without ref option
As of 27th March 2019 the way to do so is:
1) Setting the field you want to populate as a ObjectId without providing a ref.
var eventSchema = new Schema({ name: String, // The id of the corresponding conversation // Notice there's no ref here! conversation: ObjectId});
2) While making the query pass the model for the schema along with the query:
Event. find(). populate({ path: 'conversation', model: Conversation }). exec(function(error, docs) { /* ... */ });
REF: https://mongoosejs.com/docs/populate.html#cross-db-populate