Version: 4.3

Class: JavaScriptMetadataProvider

deprecated use EntitySchema instead

Hierarchy

Constructors

constructor

+ new JavaScriptMetadataProvider(config: IConfiguration): JavaScriptMetadataProvider

Inherited from MetadataProvider.constructor

Defined in packages/core/src/metadata/MetadataProvider.ts:9

Parameters:

NameType
configIConfiguration

Returns: JavaScriptMetadataProvider

Properties

config

Protected Readonly config: IConfiguration

Inherited from MetadataProvider.config

Defined in packages/core/src/metadata/MetadataProvider.ts:11

Methods

getSchema

PrivategetSchema(meta: EntityMetadata): any

Defined in packages/core/src/metadata/JavaScriptMetadataProvider.ts:55

Parameters:

NameType
metaEntityMetadata

Returns: any


initProperties

ProtectedinitProperties(meta: EntityMetadata, fallback: (prop: EntityProperty) => void | Promise<void>): Promise<void>

Inherited from MetadataProvider.initProperties

Defined in packages/core/src/metadata/MetadataProvider.ts:23

Parameters:

NameType
metaEntityMetadata
fallback(prop: EntityProperty) => void | Promise<void>

Returns: Promise<void>


initProperty

PrivateinitProperty(prop: EntityProperty, propName: string): void

Defined in packages/core/src/metadata/JavaScriptMetadataProvider.ts:43

Parameters:

NameType
propEntityProperty
propNamestring

Returns: void


loadEntityMetadata

loadEntityMetadata(meta: EntityMetadata, name: string): Promise<void>

Overrides MetadataProvider.loadEntityMetadata

Defined in packages/core/src/metadata/JavaScriptMetadataProvider.ts:11

Parameters:

NameType
metaEntityMetadata
namestring

Returns: Promise<void>


loadFromCache

loadFromCache(meta: EntityMetadata, cache: EntityMetadata): void

Overrides MetadataProvider.loadFromCache

Defined in packages/core/src/metadata/JavaScriptMetadataProvider.ts:28

Re-hydrates missing attributes like onUpdate (functions are lost when caching to JSON)

Parameters:

NameType
metaEntityMetadata
cacheEntityMetadata

Returns: void


useCache

useCache(): boolean

Inherited from MetadataProvider.useCache

Defined in packages/core/src/metadata/MetadataProvider.ts:19

Returns: boolean

Last updated on by Martin Adámek