# Decorator Auto

Decorator mongoose property
Module
import { Auto } from "@tsed/mongoose"
Source/packages/mongoose/src/decorators/auto.ts

# Overview

function Auto(auto?: boolean): PropertyDecorator;

# Description

If true, uses Mongoose's default _id settings. Only allowed for ObjectIds

# Example

@Model()
export class EventModel {
  @ExcludeIndexes()
  field: string;
}
1
2
3
4
5

Other topics