Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ClassMapping

Represents the mapping from a document to a named class type.

Hierarchy

Index

Properties

classConstructor

classConstructor: Function

The constructor for the class.

discriminatorField

discriminatorField: string

The database document field to use to represent the type of the class. If not specified, the field name from the Configuration is used. Only valid on the root mapping of an inheritance hierarchy.

discriminatorValue

discriminatorValue: string

Readonly property gets the value used to represent the class type in the database document.

flags

Readonly flags that describe the mapping. This value is assigned internally and should not be modified.

hasBaseClass

hasBaseClass: boolean

Readonly property indicates if this class mapping has a base class.

hasSubClasses

hasSubClasses: boolean

Readonly property indicates if this class mapping has derived classes.

name

name: string

The name of the class.

Methods

addProperty

getProperty

hasFlags

setDiscriminatorValue

  • setDiscriminatorValue(value: string): void
  • Sets the value used to represent the class type in the database document. If not specified, the naming strategy in the Configuration is used to determine the discriminator value based on the class name.

    Parameters

    • value: string

      The value to use for the discriminator for this class.

    Returns void

validateProperty

  • validateProperty(property: Property): string

Generated using TypeDoc