deno.land / x / mongoose@6.7.5 / docs / advanced_schemas.md

advanced_schemas.md

Advanced Schemas

Creating from ES6 Classes Using loadClass()

Mongoose allows creating schemas from ES6 classes. The loadClass() function lets you pull in methods, statics, and virtuals from an ES6 class. A class method maps to a schema method, a static method maps to a schema static, and getters/setters map to virtuals.

[require:Creating from ES6 Classes Using `loadClass\(\)`]
mongoose

Version Info

Tagged at
a year ago