Version: 4.3

Class: MetadataValidator

Hierarchy

  • MetadataValidator

Methods

validateBidirectional

PrivatevalidateBidirectional(meta: EntityMetadata, prop: EntityProperty, metadata: MetadataStorage): void

Defined in packages/core/src/metadata/MetadataValidator.ts:80

Parameters:

NameType
metaEntityMetadata
propEntityProperty
metadataMetadataStorage

Returns: void


validateDiscovered

validateDiscovered(discovered: EntityMetadata[], warnWhenNoEntities: boolean): void

Defined in packages/core/src/metadata/MetadataValidator.ts:39

Parameters:

NameType
discoveredEntityMetadata[]
warnWhenNoEntitiesboolean

Returns: void


validateEntityDefinition

validateEntityDefinition(metadata: MetadataStorage, name: string): void

Defined in packages/core/src/metadata/MetadataValidator.ts:20

Parameters:

NameType
metadataMetadataStorage
namestring

Returns: void


validateIndexes

PrivatevalidateIndexes(meta: EntityMetadata, indexes: { properties: string | string[] }[], type: "index" | "unique"): void

Defined in packages/core/src/metadata/MetadataValidator.ts:127

Parameters:

NameType
metaEntityMetadata
indexes{ properties: string | string[] }[]
type"index" | "unique"

Returns: void


validateInverseSide

PrivatevalidateInverseSide(meta: EntityMetadata, prop: EntityProperty, owner: EntityProperty, metadata: MetadataStorage): void

Defined in packages/core/src/metadata/MetadataValidator.ts:110

Parameters:

NameType
metaEntityMetadata
propEntityProperty
ownerEntityProperty
metadataMetadataStorage

Returns: void


validateOwningSide

PrivatevalidateOwningSide(meta: EntityMetadata, prop: EntityProperty, inverse: EntityProperty, metadata: MetadataStorage): void

Defined in packages/core/src/metadata/MetadataValidator.ts:90

Parameters:

NameType
metaEntityMetadata
propEntityProperty
inverseEntityProperty
metadataMetadataStorage

Returns: void


validateReference

PrivatevalidateReference(meta: EntityMetadata, prop: EntityProperty, metadata: MetadataStorage): void

Defined in packages/core/src/metadata/MetadataValidator.ts:68

Parameters:

NameType
metaEntityMetadata
propEntityProperty
metadataMetadataStorage

Returns: void


validateVersionField

PrivatevalidateVersionField(meta: EntityMetadata): void

Defined in packages/core/src/metadata/MetadataValidator.ts:137

Parameters:

NameType
metaEntityMetadata

Returns: void


validateSingleDecorator

StaticvalidateSingleDecorator(meta: EntityMetadata, propertyName: string, reference: ReferenceType): void

Defined in packages/core/src/metadata/MetadataValidator.ts:14

Validate there is only one property decorator. This disallows using @Property() together with e.g. @ManyToOne() on the same property. One should use only @ManyToOne() in such case. We allow the existence of the property in metadata if the reference type is the same, this should allow things like HMR to work.

Parameters:

NameType
metaEntityMetadata
propertyNamestring
referenceReferenceType

Returns: void

Last updated on by Martin Adámek