Version: 4.3

Class: MetadataError<T>

Type parameters

NameTypeDefault
TAnyEntityAnyEntity

Hierarchy

Constructors

constructor

+ new MetadataError(message: string, entity?: T): MetadataError

Inherited from ValidationError.constructor

Defined in packages/core/src/errors.ts:4

Parameters:

NameType
messagestring
entity?T

Returns: MetadataError

Properties

message

message: string

Inherited from DriverException.message

Defined in docs/node_modules/typescript/lib/lib.es5.d.ts:974


name

name: string

Inherited from DriverException.name

Defined in docs/node_modules/typescript/lib/lib.es5.d.ts:973


stack

Optional stack: string

Inherited from DriverException.stack

Defined in docs/node_modules/typescript/lib/lib.es5.d.ts:975

Methods

getEntity

getEntity(): AnyEntity | undefined

Inherited from ValidationError.getEntity

Defined in packages/core/src/errors.ts:17

Gets instance of entity that caused this error.

Returns: AnyEntity | undefined


cannotCommit

StaticcannotCommit(): ValidationError

Inherited from ValidationError.cannotCommit

Defined in packages/core/src/errors.ts:92

Returns: ValidationError


cannotModifyInverseCollection

StaticcannotModifyInverseCollection(owner: AnyEntity, property: EntityProperty): ValidationError

Inherited from ValidationError.cannotModifyInverseCollection

Defined in packages/core/src/errors.ts:79

Parameters:

NameType
ownerAnyEntity
propertyEntityProperty

Returns: ValidationError


cannotUseOperatorsInsideEmbeddables

StaticcannotUseOperatorsInsideEmbeddables(className: string, propName: string, payload: Dictionary): ValidationError

Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables

Defined in packages/core/src/errors.ts:96

Parameters:

NameType
classNamestring
propNamestring
payloadDictionary

Returns: ValidationError


duplicateEntityDiscovered

StaticduplicateEntityDiscovered(paths: string[]): MetadataError

Defined in packages/core/src/errors.ts:187

Parameters:

NameType
pathsstring[]

Returns: MetadataError


entityNotFound

StaticentityNotFound(name: string, path: string): MetadataError

Defined in packages/core/src/errors.ts:154

Parameters:

NameType
namestring
pathstring

Returns: MetadataError


entityNotManaged

StaticentityNotManaged(entity: AnyEntity): ValidationError

Inherited from ValidationError.entityNotManaged

Defined in packages/core/src/errors.ts:43

Parameters:

NameType
entityAnyEntity

Returns: ValidationError


fromCollectionNotInitialized

StaticfromCollectionNotInitialized(entity: AnyEntity, prop: EntityProperty): ValidationError

Inherited from ValidationError.fromCollectionNotInitialized

Defined in packages/core/src/errors.ts:28

Parameters:

NameType
entityAnyEntity
propEntityProperty

Returns: ValidationError


fromMergeWithoutPK

StaticfromMergeWithoutPK(meta: EntityMetadata): void

Inherited from ValidationError.fromMergeWithoutPK

Defined in packages/core/src/errors.ts:35

Parameters:

NameType
metaEntityMetadata

Returns: void


fromMessage

Static PrivatefromMessage(meta: EntityMetadata, prop: EntityProperty, message: string): MetadataError

Defined in packages/core/src/errors.ts:199

Parameters:

NameType
metaEntityMetadata
propEntityProperty
messagestring

Returns: MetadataError


fromMissingPrimaryKey

StaticfromMissingPrimaryKey(meta: EntityMetadata): MetadataError

Defined in packages/core/src/errors.ts:126

Parameters:

NameType
metaEntityMetadata

Returns: MetadataError


fromUnknownBaseEntity

StaticfromUnknownBaseEntity(meta: EntityMetadata): MetadataError

Defined in packages/core/src/errors.ts:175

Parameters:

NameType
metaEntityMetadata

Returns: MetadataError


fromUnknownEntity

StaticfromUnknownEntity(className: string, source: string): MetadataError

Defined in packages/core/src/errors.ts:171

Parameters:

NameType
classNamestring
sourcestring

Returns: MetadataError


fromWrongOwnership

StaticfromWrongOwnership(meta: EntityMetadata, prop: EntityProperty, key: keyof EntityProperty): MetadataError

Defined in packages/core/src/errors.ts:146

Parameters:

NameType
metaEntityMetadata
propEntityProperty
keykeyof EntityProperty

Returns: MetadataError


fromWrongPropertyType

StaticfromWrongPropertyType(entity: AnyEntity, property: string, expectedType: string, givenType: string, givenValue: string): ValidationError

Inherited from ValidationError.fromWrongPropertyType

Defined in packages/core/src/errors.ts:21

Parameters:

NameType
entityAnyEntity
propertystring
expectedTypestring
givenTypestring
givenValuestring

Returns: ValidationError


fromWrongReference

StaticfromWrongReference(meta: EntityMetadata, prop: EntityProperty, key: keyof EntityProperty, owner?: EntityProperty): MetadataError

Defined in packages/core/src/errors.ts:130

Parameters:

NameType
metaEntityMetadata
propEntityProperty
keykeyof EntityProperty
owner?EntityProperty

Returns: MetadataError


fromWrongTypeDefinition

StaticfromWrongTypeDefinition(meta: EntityMetadata, prop: EntityProperty): MetadataError

Defined in packages/core/src/errors.ts:138

Parameters:

NameType
metaEntityMetadata
propEntityProperty

Returns: MetadataError


invalidCompositeIdentifier

StaticinvalidCompositeIdentifier(meta: EntityMetadata): ValidationError

Inherited from ValidationError.invalidCompositeIdentifier

Defined in packages/core/src/errors.ts:88

Parameters:

NameType
metaEntityMetadata

Returns: ValidationError


invalidPropertyName

StaticinvalidPropertyName(entityName: string, invalid: string): ValidationError

Inherited from ValidationError.invalidPropertyName

Defined in packages/core/src/errors.ts:65

Parameters:

NameType
entityNamestring
invalidstring

Returns: ValidationError


invalidType

StaticinvalidType(type: Constructor<any>, value: any, mode: string): ValidationError

Inherited from ValidationError.invalidType

Defined in packages/core/src/errors.ts:69

Parameters:

NameType
typeConstructor<any>
valueany
modestring

Returns: ValidationError


invalidVersionFieldType

StaticinvalidVersionFieldType(meta: EntityMetadata): MetadataError

Defined in packages/core/src/errors.ts:166

Parameters:

NameType
metaEntityMetadata

Returns: MetadataError


missingMetadata

StaticmissingMetadata(entity: string): MetadataError

Defined in packages/core/src/errors.ts:195

Parameters:

NameType
entitystring

Returns: MetadataError


multipleDecorators

StaticmultipleDecorators(entityName: string, propertyName: string): MetadataError

Defined in packages/core/src/errors.ts:191

Parameters:

NameType
entityNamestring
propertyNamestring

Returns: MetadataError


multipleVersionFields

StaticmultipleVersionFields(meta: EntityMetadata, fields: string[]): MetadataError

Defined in packages/core/src/errors.ts:162

Parameters:

NameType
metaEntityMetadata
fieldsstring[]

Returns: MetadataError


noEntityDiscovered

StaticnoEntityDiscovered(): MetadataError

Defined in packages/core/src/errors.ts:179

Returns: MetadataError


notDiscoveredEntity

StaticnotDiscoveredEntity(data: any, meta?: EntityMetadata): ValidationError

Inherited from ValidationError.notDiscoveredEntity

Defined in packages/core/src/errors.ts:52

Parameters:

NameType
dataany
meta?EntityMetadata

Returns: ValidationError


notEntity

StaticnotEntity(owner: AnyEntity, prop: EntityProperty, data: any): ValidationError

Inherited from ValidationError.notEntity

Defined in packages/core/src/errors.ts:47

Parameters:

NameType
ownerAnyEntity
propEntityProperty
dataany

Returns: ValidationError


onlyAbstractEntitiesDiscovered

StaticonlyAbstractEntitiesDiscovered(): MetadataError

Defined in packages/core/src/errors.ts:183

Returns: MetadataError


transactionRequired

StatictransactionRequired(): ValidationError

Inherited from ValidationError.transactionRequired

Defined in packages/core/src/errors.ts:39

Returns: ValidationError


unknownIndexProperty

StaticunknownIndexProperty(meta: EntityMetadata, prop: string, type: string): MetadataError

Defined in packages/core/src/errors.ts:158

Parameters:

NameType
metaEntityMetadata
propstring
typestring

Returns: MetadataError

Last updated on by Martin Adámek