Closed rdougan closed 4 years ago
I noticed that nested virtuals are supported, but do not work if they are an object:
const schema = new mongoose.Schema({ nested: { test: { a: String } } }, { id: false }); schema.virtual('nested.test2').get(function() { return this.nested.test; });
Does not work:
.lean({virtuals: ['nested.test2']});
I've fixed it, added a test, and verified all existing tests pass.
I noticed that nested virtuals are supported, but do not work if they are an object:
Does not work:
I've fixed it, added a test, and verified all existing tests pass.