Skip to content

Enable the library conditionally #110

@andrealeo83

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.

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