Skip to content

Instantly share code, notes, and snippets.

Last active January 14, 2019 15:08
What would you like to do?
Enabling Virtuals In Mongoose Lean Mode (in a FeathersJs service)
// user.service.js
import createService from 'feathers-mongoose';
// other imports...
export default (app) => {
const Model = createModel(app);
// ...
const options = {
lean: {virtuals: true}, // add this line
const service = createService(options);
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment