Skip to main content
Version: 4.5

core.MetadataValidator

Constructors#

constructor#

+ new MetadataValidator(): MetadataValidator

Returns: MetadataValidator

Methods#

validateBidirectional#

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

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>
metadataMetadataStorage

Returns: void

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


validateDiscovered#

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

Parameters:#

NameType
discoveredEntityMetadata<any>[]
warnWhenNoEntitiesboolean

Returns: void

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


validateEntityDefinition#

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

Parameters:#

NameType
metadataMetadataStorage
namestring

Returns: void

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


validateIndexes#

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

Parameters:#

NameType
metaEntityMetadata<any>
indexes{ properties: string | string[] }[]
typeindex | unique

Returns: void

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


validateInverseSide#

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

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>
ownerEntityProperty<any>
metadataMetadataStorage

Returns: void

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


validateOwningSide#

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

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>
inverseEntityProperty<any>
metadataMetadataStorage

Returns: void

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


validateReference#

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

Parameters:#

NameType
metaEntityMetadata<any>
propEntityProperty<any>
metadataMetadataStorage

Returns: void

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


validateVersionField#

PrivatevalidateVersionField(meta: EntityMetadata<any>): void

Parameters:#

NameType
metaEntityMetadata<any>

Returns: void

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


validateSingleDecorator#

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

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<any>
propertyNamestring
referenceReferenceType

Returns: void

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

Last updated on by dependabot[bot]