Skip to content

Support model ref and function ref #42

@LSafer

Description

@LSafer

Explanation

Mongoose allows the field ref to be any of:

  • string
  • model
  • a function that returns string
  • a function that returns model

Expected Behavior

When ref is a function, the plugin executes the function
When ref is a model, the plugin takes the name of the model

Actual Behavior

The plugin uses the toString function the value on ref to get the collection name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions