Function deleteModel

  • Deletes a existing model so that it can be overwritten with another model (deletes from mongoose.connection and typegoose models cache and typegoose constructors cache)

    Parameters

    • name: string

      The Model's mongoose name

    Returns void

    Example

    class ClassName {}
    const NameModel = getModelForClass(ClassName);
    deleteModel("ClassName");

Generated using TypeDoc