Skip to content

Enable the library conditionally #110

Description

@andrealeo83

Is it possible to apply the sequence only if a condition is applied?

For example:

User Model fields:
UUID
user_id -> inc_field
type: "Student" or "Teacher"

I want to generate the sequence for the user_id field using mongoose-sequence only if type == "Student" and not for type== "Teacher""

For me it's important to disable the sequence generation for certain conditions to preserve the performance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions