Populate Virtuals does not seem to work. Could anyone show me the error?
问题 I am studying the Populate Virtuals: https://mongoosejs.com/docs/populate.html#populate-virtuals require("./connection"); // //---------------------------------------------------- const mongoose = require("mongoose"); const Schema = mongoose.Schema; const PersonSchema = new Schema({ name: String, band: String }); const BandSchema = new Schema({ name: String }); BandSchema.virtual("members", { ref: "Person", // The model to use localField: "name", // Find people where `localField` foreignField