#
Class: MetadataError<T>core.MetadataError
#
Type parametersName | Type | Default |
---|---|---|
T | AnyEntity | AnyEntity |
#
Hierarchy↳ MetadataError
#
Constructors#
constructor+ new MetadataError<T>(message
: string, entity?
: T): MetadataError<T>
#
Type parameters:Name | Type | Default |
---|---|---|
T | AnyEntity<any> | AnyEntity<any\> |
#
Parameters:Name | Type |
---|---|
message | string |
entity? | T |
Returns: MetadataError<T>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:4
#
Properties#
message• message: string
Inherited from: ValidationError.message
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:974
#
name• name: string
Inherited from: ValidationError.name
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:973
#
prepareStackTrace• Optional
prepareStackTrace: undefined | (err
: Error, stackTraces
: CallSite[]) => any
Optional override for formatting stack traces
see
https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
Inherited from: ValidationError.prepareStackTrace
Defined in: node_modules/@types/node/globals.d.ts:11
#
stack• Optional
stack: undefined | string
Inherited from: ValidationError.stack
Defined in: docs/node_modules/typescript/lib/lib.es5.d.ts:975
#
stackTraceLimit• stackTraceLimit: number
Inherited from: ValidationError.stackTraceLimit
Defined in: node_modules/@types/node/globals.d.ts:13
#
Methods#
captureStackTraceâ–¸ captureStackTrace(targetObject
: object, constructorOpt?
: Function): void
Create .stack property on a target object
#
Parameters:Name | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns: void
Inherited from: ValidationError
Defined in: node_modules/@types/node/globals.d.ts:4
#
getEntityâ–¸ getEntity(): undefined | AnyEntity<any>
Gets instance of entity that caused this error.
Returns: undefined | AnyEntity<any>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:17
#
cannotCommitâ–¸ Static
cannotCommit(): ValidationError<AnyEntity<any>>
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:92
#
cannotModifyInverseCollectionâ–¸ Static
cannotModifyInverseCollection(owner
: AnyEntity<any>, property
: EntityProperty<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
owner | AnyEntity<any> |
property | EntityProperty<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:79
#
cannotUseOperatorsInsideEmbeddablesâ–¸ Static
cannotUseOperatorsInsideEmbeddables(className
: string, propName
: string, payload
: Dictionary<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
propName | string |
payload | Dictionary<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:96
#
conflictingPropertyNameâ–¸ Static
conflictingPropertyName(className
: string, name
: string, embeddedName
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
name | string |
embeddedName | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:199
#
duplicateEntityDiscoveredâ–¸ Static
duplicateEntityDiscovered(paths
: string[]): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
paths | string[] |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:187
#
entityNotFoundâ–¸ Static
entityNotFound(name
: string, path
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
name | string |
path | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:158
#
entityNotManagedâ–¸ Static
entityNotManaged(entity
: AnyEntity<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:43
#
fromCollectionNotInitializedâ–¸ Static
fromCollectionNotInitialized(entity
: AnyEntity<any>, prop
: EntityProperty<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
prop | EntityProperty<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:28
#
fromMergeWithoutPKâ–¸ Static
fromMergeWithoutPK(meta
: EntityMetadata<any>): void
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: void
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:35
#
fromMessageâ–¸ Private
Static
fromMessage(meta
: EntityMetadata<any>, prop
: EntityProperty<any>, message
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
prop | EntityProperty<any> |
message | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:203
#
fromMissingPrimaryKeyâ–¸ Static
fromMissingPrimaryKey(meta
: EntityMetadata<any>): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:130
#
fromUnknownEntityâ–¸ Static
fromUnknownEntity(className
: string, source
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
source | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:175
#
fromWrongOwnershipâ–¸ Static
fromWrongOwnership(meta
: EntityMetadata<any>, prop
: EntityProperty<any>, key
: object | default | cascade | name | entity | type | targetMeta | columnTypes | customType | primary | serializedPrimaryKey | lazy | array | length | reference | wrappedReference | fieldNames | fieldNameRaw | defaultRaw | formula | prefix | embedded | embeddable | embeddedProps | index | unique | nullable | inherited | unsigned | mapToPk | persist | hidden | enum | items | version | eager | setter | getter | getterName | orphanRemoval | onCreate | onUpdate | onDelete | onUpdateIntegrity | strategy | owner | inversedBy | mappedBy | orderBy | fixedOrder | fixedOrderColumn | pivotTable | joinColumns | inverseJoinColumns | referencedColumnNames | referencedTableName | referencedPKs | serializer | serializedName | comment | userDefined): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
prop | EntityProperty<any> |
key | object | default | cascade | name | entity | type | targetMeta | columnTypes | customType | primary | serializedPrimaryKey | lazy | array | length | reference | wrappedReference | fieldNames | fieldNameRaw | defaultRaw | formula | prefix | embedded | embeddable | embeddedProps | index | unique | nullable | inherited | unsigned | mapToPk | persist | hidden | enum | items | version | eager | setter | getter | getterName | orphanRemoval | onCreate | onUpdate | onDelete | onUpdateIntegrity | strategy | owner | inversedBy | mappedBy | orderBy | fixedOrder | fixedOrderColumn | pivotTable | joinColumns | inverseJoinColumns | referencedColumnNames | referencedTableName | referencedPKs | serializer | serializedName | comment | userDefined |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:150
#
fromWrongPropertyTypeâ–¸ Static
fromWrongPropertyType(entity
: AnyEntity<any>, property
: string, expectedType
: string, givenType
: string, givenValue
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | AnyEntity<any> |
property | string |
expectedType | string |
givenType | string |
givenValue | string |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:21
#
fromWrongReferenceâ–¸ Static
fromWrongReference(meta
: EntityMetadata<any>, prop
: EntityProperty<any>, key
: object | default | cascade | name | entity | type | targetMeta | columnTypes | customType | primary | serializedPrimaryKey | lazy | array | length | reference | wrappedReference | fieldNames | fieldNameRaw | defaultRaw | formula | prefix | embedded | embeddable | embeddedProps | index | unique | nullable | inherited | unsigned | mapToPk | persist | hidden | enum | items | version | eager | setter | getter | getterName | orphanRemoval | onCreate | onUpdate | onDelete | onUpdateIntegrity | strategy | owner | inversedBy | mappedBy | orderBy | fixedOrder | fixedOrderColumn | pivotTable | joinColumns | inverseJoinColumns | referencedColumnNames | referencedTableName | referencedPKs | serializer | serializedName | comment | userDefined, owner?
: EntityProperty<any>): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
prop | EntityProperty<any> |
key | object | default | cascade | name | entity | type | targetMeta | columnTypes | customType | primary | serializedPrimaryKey | lazy | array | length | reference | wrappedReference | fieldNames | fieldNameRaw | defaultRaw | formula | prefix | embedded | embeddable | embeddedProps | index | unique | nullable | inherited | unsigned | mapToPk | persist | hidden | enum | items | version | eager | setter | getter | getterName | orphanRemoval | onCreate | onUpdate | onDelete | onUpdateIntegrity | strategy | owner | inversedBy | mappedBy | orderBy | fixedOrder | fixedOrderColumn | pivotTable | joinColumns | inverseJoinColumns | referencedColumnNames | referencedTableName | referencedPKs | serializer | serializedName | comment | userDefined |
owner? | EntityProperty<any> |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:134
#
fromWrongTypeDefinitionâ–¸ Static
fromWrongTypeDefinition(meta
: EntityMetadata<any>, prop
: EntityProperty<any>): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
prop | EntityProperty<any> |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:142
#
invalidCompositeIdentifierâ–¸ Static
invalidCompositeIdentifier(meta
: EntityMetadata<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:88
#
invalidEmbeddableQueryâ–¸ Static
invalidEmbeddableQuery(className
: string, propName
: string, embeddableType
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
className | string |
propName | string |
embeddableType | string |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:100
#
invalidPropertyNameâ–¸ Static
invalidPropertyName(entityName
: string, invalid
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entityName | string |
invalid | string |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:65
#
invalidTypeâ–¸ Static
invalidType(type
: Constructor<any>, value
: any, mode
: string): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
type | Constructor<any> |
value | any |
mode | string |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:69
#
invalidVersionFieldTypeâ–¸ Static
invalidVersionFieldType(meta
: EntityMetadata<any>): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:170
#
missingMetadataâ–¸ Static
missingMetadata(entity
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entity | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:195
#
multipleDecoratorsâ–¸ Static
multipleDecorators(entityName
: string, propertyName
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
entityName | string |
propertyName | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:191
#
multipleVersionFieldsâ–¸ Static
multipleVersionFields(meta
: EntityMetadata<any>, fields
: string[]): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
fields | string[] |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:166
#
noEntityDiscoveredâ–¸ Static
noEntityDiscovered(): MetadataError<AnyEntity<any>>
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:179
#
notDiscoveredEntityâ–¸ Static
notDiscoveredEntity(data
: any, meta?
: EntityMetadata<any>): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
data | any |
meta? | EntityMetadata<any> |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:52
#
notEntityâ–¸ Static
notEntity(owner
: AnyEntity<any>, prop
: EntityProperty<any>, data
: any): ValidationError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
owner | AnyEntity<any> |
prop | EntityProperty<any> |
data | any |
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:47
#
onlyAbstractEntitiesDiscoveredâ–¸ Static
onlyAbstractEntitiesDiscovered(): MetadataError<AnyEntity<any>>
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:183
#
transactionRequiredâ–¸ Static
transactionRequired(): ValidationError<AnyEntity<any>>
Returns: ValidationError<AnyEntity<any>>
Inherited from: ValidationError
Defined in: packages/core/src/errors.ts:39
#
unknownIndexPropertyâ–¸ Static
unknownIndexProperty(meta
: EntityMetadata<any>, prop
: string, type
: string): MetadataError<AnyEntity<any>>
#
Parameters:Name | Type |
---|---|
meta | EntityMetadata<any> |
prop | string |
type | string |
Returns: MetadataError<AnyEntity<any>>
Defined in: packages/core/src/errors.ts:162