# createModel Function

Module
import { createModel } from "@tsed/mongoose"
Source/packages/mongoose/src/utils/createModel.ts

# Overview

function createModel<T>(target: any, schema: mongoose.Schema, name?: string, collection?: string, skipInit?: boolean, connection?: Connection): mongoose.Model<mongoose.Document, {}>;
Param Type Description
target any Class attached to the schema and model. schema

# Description

Create an instance of mongoose.model from a class.

Other topics