Enabling Virtuals In Mongoose Lean Mode (in a FeathersJs service)by@melvinkcx2
3,451 reads

Enabling Virtuals In Mongoose Lean Mode (in a FeathersJs service)

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Lean mode in Mongoose is enabled to enhance query performance. Virtuals are attributes derived during query, which the values are not actually persisted in MongoDB. Virtual is one of Mongoose magic attributes, it is disabled by default. Using the plugin mongoose-lean-virtuals, apply virtuals to a Feathers.js service (generated with feathers-cli) In this article, I will be focusing on how to apply the plugin in a typical Feather.js Mongoose service.

Company Mentioned

Mention Thumbnail
featured image - Enabling Virtuals In Mongoose Lean Mode (in a FeathersJs service)
Melvin Koh HackerNoon profile picture

@melvinkcx2

Melvin Koh

Software Engineer | Maintainer of fastapi-events


Receive Stories from @melvinkcx2

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!