MetadataError <T>
Hierarchy
- ValidationError<T>
- MetadataError
Index
Constructors
Properties
Methods
- getEntity
- ambiguousEntityName
- cannotCommit
- cannotModifyInverseCollection
- cannotModifyReadonlyCollection
- cannotRemoveFromCollectionWithoutOrphanRemoval
- cannotStageNonScalarSessionVariable
- cannotUseGlobalContext
- cannotUseGroupOperatorsInsideScalars
- cannotUseOperatorsInsideEmbeddables
- captureStackTrace
- connectionSessionContextNotSupported
- dangerousPropertyName
- duplicateEntityDiscovered
- duplicateFieldName
- duplicatePolicyName
- entityNotManaged
- fromInversideSidePrimary
- fromMergeWithoutPK
- fromMissingOption
- fromMissingPrimaryKey
- fromUnknownEntity
- fromWrongForeignKey
- fromWrongOwnership
- fromWrongPropertyType
- fromWrongReference
- fromWrongReferenceKind
- fromWrongRepositoryType
- fromWrongTypeDefinition
- incompatiblePolymorphicTargets
- invalidCollectionValues
- invalidCompositeIdentifier
- invalidEmbeddableQuery
- invalidEnumArrayItems
- invalidManyToManyWithPivotEntity
- invalidPrimaryKey
- invalidPropertyName
- invalidQueryCondition
- invalidType
- invalidVersionFieldType
- missingMetadata
- mixedInheritanceStrategies
- multipleDecorators
- multipleVersionFields
- noEntityDiscovered
- nonPersistentCompositeProp
- notDiscoveredEntity
- notEntity
- onlyAbstractEntitiesDiscovered
- prepareStackTrace
- propertyRequired
- propertyTargetsEntityType
- rlsFilterCannotBeRegisteredAtRuntime
- rlsFilterDependsOnRuntimeState
- rlsFilterMultiArgSetting
- rlsFilterMustBeEntityScoped
- rlsFilterNotSupportedByDriver
- rlsFilterOnNonRootStiEntity
- rlsFilterUncastableType
- rlsFilterUnmanagedColumn
- rlsFilterUnsupportedCond
- rowLevelSecurityNotSupportedByDriver
- rowLevelSecurityOnNonRootStiEntity
- sessionContextInsideTransaction
- sessionContextNotSupported
- sessionContextRequiresImplicitTransactions
- sessionContextStreamRequiresTransaction
- sessionContextWithDisabledTransactions
- targetIsAbstract
- targetKeyNotFound
- targetKeyNotUnique
- targetKeyOnManyToMany
- throughRelationCompositeTarget
- throughRelationInvalidKind
- throughRelationMissingProperty
- tptNotSupportedByDriver
- transactionRequired
- triggersNotSupportedByDriver
- unknownIndexProperty
- viewEntityWithoutExpression
Constructors
constructor
Parameters
message: string
optionalentity: T
Returns MetadataError<T>
Properties
optionalinheritedcause
optionalreadonlyinheritedentity
inheritedmessage
inheritedname
optionalinheritedstack
staticinheritedstackTraceLimit
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Methods
inheritedgetEntity
Gets instance of entity that caused this error.
Returns undefined | Partial<any>
staticambiguousEntityName
Parameters
className: string
Returns MetadataError<Partial<any>>
staticinheritedcannotCommit
Returns ValidationError<Partial<any>>
staticinheritedcannotModifyInverseCollection
Parameters
owner: Partial<any>
property: EntityProperty<any, any>
Returns ValidationError<Partial<any>>
staticinheritedcannotModifyReadonlyCollection
Parameters
owner: Partial<any>
property: EntityProperty<any, any>
Returns ValidationError<Partial<any>>
staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval
Parameters
owner: Partial<any>
property: EntityProperty<any, any>
Returns ValidationError<Partial<any>>
staticinheritedcannotStageNonScalarSessionVariable
Parameters
filterName: string
argName: string
Returns ValidationError<Partial<any>>
staticinheritedcannotUseGlobalContext
Returns ValidationError<Partial<any>>
staticinheritedcannotUseGroupOperatorsInsideScalars
Parameters
entityName: EntityName
propName: string
payload: unknown
Returns ValidationError<Partial<any>>
staticinheritedcannotUseOperatorsInsideEmbeddables
Parameters
entityName: EntityName
propName: string
payload: unknown
Returns ValidationError<Partial<any>>
staticinheritedcaptureStackTrace
Creates a
.stackproperty ontargetObject, which when accessed returns a string representing the location in the code at whichError.captureStackTrace()was called.const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.The optional
constructorOptargument accepts a function. If given, all frames aboveconstructorOpt, includingconstructorOpt, will be omitted from the generated stack trace.The
constructorOptargument is useful for hiding implementation details of error generation from the user. For instance:function a() {b();}function b() {c();}function c() {// Create an error without stack trace to avoid calculating the stack trace twice.const { stackTraceLimit } = Error;Error.stackTraceLimit = 0;const error = new Error();Error.stackTraceLimit = stackTraceLimit;// Capture the stack trace above function bError.captureStackTrace(error, b); // Neither function c, nor b is included in the stack tracethrow error;}a();Parameters
targetObject: object
optionalconstructorOpt: Function
Returns void
staticinheritedconnectionSessionContextNotSupported
Returns ValidationError<Partial<any>>
staticdangerousPropertyName
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticduplicateEntityDiscovered
Parameters
paths: string[]
Returns MetadataError<Partial<any>>
staticduplicateFieldName
Parameters
entityName: EntityName
names: [string, string][]
Returns MetadataError<Partial<any>>
staticduplicatePolicyName
Thrown when two policies on the same entity are given the same explicit name.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
name: string
Returns MetadataError<Partial<any>>
staticinheritedentityNotManaged
Parameters
entity: Partial<any>
Returns ValidationError<Partial<any>>
staticfromInversideSidePrimary
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
owner: EntityProperty<any, any>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticinheritedfromMergeWithoutPK
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns ValidationError<Partial<any>>
staticfromMissingOption
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
option: string
Returns MetadataError<Partial<any>>
staticfromMissingPrimaryKey
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticfromUnknownEntity
Parameters
entityName: string
source: string
Returns MetadataError<Partial<any>>
staticfromWrongForeignKey
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
key: string
Returns MetadataError<Partial<any>>
staticfromWrongOwnership
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
key: inversedBy | mappedBy
Returns MetadataError<Partial<any>>
staticinheritedfromWrongPropertyType
Parameters
entity: Partial<any>
property: string
expectedType: string
givenType: string
givenValue: string
Returns ValidationError<Partial<any>>
staticfromWrongReference
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
key: inversedBy | mappedBy
optionalowner: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticfromWrongReferenceKind
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
owner: EntityProperty<any, any>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticinheritedfromWrongRepositoryType
Parameters
entityName: string
repoType: string
method: string
Returns ValidationError<Partial<any>>
staticfromWrongTypeDefinition
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticincompatiblePolymorphicTargets
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
target1: EntityMetadata<any, EntityCtor<any>>
target2: EntityMetadata<any, EntityCtor<any>>
reason: string
Returns MetadataError<Partial<any>>
staticinheritedinvalidCollectionValues
Parameters
entityName: string
propName: string
invalid: unknown
Returns ValidationError<Partial<any>>
staticinheritedinvalidCompositeIdentifier
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns ValidationError<Partial<any>>
staticinheritedinvalidEmbeddableQuery
Parameters
entityName: EntityName
propName: string
embeddableType: string
Returns ValidationError<Partial<any>>
staticinheritedinvalidEnumArrayItems
Parameters
entityName: string
invalid: unknown
Returns ValidationError<Partial<any>>
staticinvalidManyToManyWithPivotEntity
Parameters
meta1: EntityMetadata<any, EntityCtor<any>>
prop1: EntityProperty<any, any>
meta2: EntityMetadata<any, EntityCtor<any>>
prop2: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticinvalidPrimaryKey
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
requiredName: string
Returns MetadataError<Partial<any>>
staticinheritedinvalidPropertyName
Parameters
entityName: EntityName
invalid: string
Returns ValidationError<Partial<any>>
staticinheritedinvalidQueryCondition
Parameters
cond: unknown
Returns ValidationError<Partial<any>>
staticinheritedinvalidType
Parameters
type: Constructor<any>
value: any
mode: string
Returns ValidationError<Partial<any>>
staticinvalidVersionFieldType
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticmissingMetadata
Parameters
entity: string
Returns MetadataError<Partial<any>>
staticmixedInheritanceStrategies
Parameters
root: EntityMetadata<any, EntityCtor<any>>
child: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticmultipleDecorators
Parameters
entityName: string
propertyName: string
Returns MetadataError<Partial<any>>
staticmultipleVersionFields
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
fields: string[]
Returns MetadataError<Partial<any>>
staticnoEntityDiscovered
Returns MetadataError<Partial<any>>
staticnonPersistentCompositeProp
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticinheritednotDiscoveredEntity
Parameters
data: any
optionalmeta: EntityMetadata<any, EntityCtor<any>>
action: string = 'persist'
Returns ValidationError<Partial<any>>
staticinheritednotEntity
Parameters
owner: Partial<any>
prop: EntityProperty<any, any>
data: any
Returns ValidationError<Partial<any>>
staticonlyAbstractEntitiesDiscovered
Returns MetadataError<Partial<any>>
staticinheritedprepareStackTrace
Parameters
err: Error
stackTraces: CallSite[]
Returns any
staticinheritedpropertyRequired
Parameters
entity: Partial<any>
property: EntityProperty<any, any>
Returns ValidationError<Partial<any>>
staticpropertyTargetsEntityType
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
target: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticrlsFilterCannotBeRegisteredAtRuntime
Thrown when an entity-scoped
rlsfilter is registered at runtime viaem.addFilter()instead of in metadata.Parameters
filterName: string
Returns MetadataError<Partial<any>>
staticrlsFilterDependsOnRuntimeState
Thrown when an
rlsfilter's condition depends on runtime state and cannot be compiled to a static policy.Parameters
filterName: string
Returns MetadataError<Partial<any>>
staticrlsFilterMultiArgSetting
Thrown when a filter's custom
settingis used with more than one argument.Parameters
filterName: string
args: string[]
Returns MetadataError<Partial<any>>
staticrlsFilterMustBeEntityScoped
Thrown when a global (config or EM registered) filter is flagged with
rls; RLS filters must be entity scoped.Parameters
filterName: string
Returns MetadataError<Partial<any>>
staticrlsFilterNotSupportedByDriver
Thrown when a filter flagged with
rlsis declared on a driver that does not support row level security.Parameters
meta: EntityMetadata<any, EntityCtor<any>>
filterName: string
Returns MetadataError<Partial<any>>
staticrlsFilterOnNonRootStiEntity
Thrown when a filter flagged with
rlsis declared on a non-root entity of an STI hierarchy.Parameters
meta: EntityMetadata<any, EntityCtor<any>>
filterName: string
Returns MetadataError<Partial<any>>
staticrlsFilterUncastableType
Thrown when an
rlsfilter compares against a column whose type has no automatic session-variable cast.Parameters
filterName: string
columnType: string
Returns MetadataError<Partial<any>>
staticrlsFilterUnmanagedColumn
Thrown when an
rlsfilter compares against a column the schema generator does not manage.Parameters
filterName: string
column: string
Returns MetadataError<Partial<any>>
staticrlsFilterUnsupportedCond
Thrown when an
rlsfilter references an argument outside of a direct comparison, which cannot be compiled.Parameters
filterName: string
Returns MetadataError<Partial<any>>
staticrowLevelSecurityNotSupportedByDriver
Thrown when row level security is declared on an entity using a driver that does not support it.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticrowLevelSecurityOnNonRootStiEntity
Thrown when row level security is declared on a non-root entity of an STI hierarchy.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticinheritedsessionContextInsideTransaction
Parameters
action: set | clear = 'set'
Returns ValidationError<Partial<any>>
staticinheritedsessionContextNotSupported
Returns ValidationError<Partial<any>>
staticinheritedsessionContextRequiresImplicitTransactions
Returns ValidationError<Partial<any>>
staticinheritedsessionContextStreamRequiresTransaction
Returns ValidationError<Partial<any>>
staticinheritedsessionContextWithDisabledTransactions
Returns ValidationError<Partial<any>>
statictargetIsAbstract
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
statictargetKeyNotFound
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
optionaltarget: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
statictargetKeyNotUnique
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
optionaltarget: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
statictargetKeyOnManyToMany
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticthroughRelationCompositeTarget
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticthroughRelationInvalidKind
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
Returns MetadataError<Partial<any>>
staticthroughRelationMissingProperty
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: EntityProperty<any, any>
through: EntityMetadata<any, EntityCtor<any>>
side: owner | target
Returns MetadataError<Partial<any>>
statictptNotSupportedByDriver
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticinheritedtransactionRequired
Returns ValidationError<Partial<any>>
statictriggersNotSupportedByDriver
Thrown when database triggers are defined on an entity using a driver that does not support them.
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
staticunknownIndexProperty
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
prop: string
type: string
Returns MetadataError<Partial<any>>
staticviewEntityWithoutExpression
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
Returns MetadataError<Partial<any>>
Error thrown when entity metadata is invalid, incomplete, or inconsistent.