Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Move to Virtuals #12

Description

@jcspencer

In reference to #10, one of the aims for v1.0.0 is to move from patching MongooseArray and Schema and to instead use Mongoose's Virtuals. This would allow mongo-relation to be used as Mongoose Plugin, instead of monkey-patching via a require call.

This would involve moving the following methods into Virtuals on Schemas:

  • belongsTo
  • hasManyBelongsToMany
  • hasMany
  • hasOne

As well as adding .create() methods to each relationship field, wether it be an array or single document.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions