Skip to main content
Version: 4.4

Class: JavaScriptMetadataProvider#

core.JavaScriptMetadataProvider

deprecated use EntitySchema instead

Hierarchy#

Constructors#

constructor#

+ new JavaScriptMetadataProvider(config: IConfiguration): JavaScriptMetadataProvider

Parameters:#

NameType
configIConfiguration

Returns: JavaScriptMetadataProvider

Inherited from: MetadataProvider

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

Properties#

config#

Protected Readonly config: IConfiguration

Inherited from: MetadataProvider.config

Methods#

getSchema#

PrivategetSchema(meta: EntityMetadata<any>): any

Parameters:#

NameType
metaEntityMetadata<any>

Returns: any

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


initProperties#

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

Parameters:#

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

Returns: Promise<void>

Inherited from: MetadataProvider

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


initProperty#

PrivateinitProperty(prop: EntityProperty<any>, propName: string): void

Parameters:#

NameType
propEntityProperty<any>
propNamestring

Returns: void

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


loadEntityMetadata#

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

Parameters:#

NameType
metaEntityMetadata<any>
namestring

Returns: Promise<void>

Overrides: MetadataProvider

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


loadFromCache#

loadFromCache(meta: EntityMetadata<any>, cache: EntityMetadata<any>): void

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

Parameters:#

NameType
metaEntityMetadata<any>
cacheEntityMetadata<any>

Returns: void

Overrides: MetadataProvider

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


useCache#

useCache(): boolean

Returns: boolean

Inherited from: MetadataProvider

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

Last updated on by renovate[bot]