Optional
parent: ReflectionClass<any>Optional
assignedProtected
autoOptional
collectionThe collection name, used in database context (also known as table name).
Usually, if this is not set, name
will be used.
@entity.collection('users').name('user')
class User {
}
A place where arbitrary data is stored, usually set via decorator t.data.
Optional
databaseThe description, extracted from the class JSDoc @description.
Contains all indexed, multi-field using entity.index and all indexes from properties.
@entity
.collection('users')
.name('user')
.index(['username', 'email'])
.index(['email', 'region'], {unique: true})
class User {
username: string;
email: string;
}
Protected
methodProtected
methodsOptional
nameThe unique entity name.
@entity.name('user')
class User {
}
Optional
Readonly
parentProtected
primariesProtected
propertiesProtected
propertyProtected
referencesReferences and back references.
True when @entity.singleTableInheritance was set.
A class using @t.singleTableInheritance registers itself in this array in its super class.
Readonly
typeOptional
validationIf a custom validator method was set via @t.validator, then this is the method name.
Optional
description?: stringOptional
optional?: trueOptional
readonly?: trueOptional
visibility?: ReflectionVisibilityAll references have a counter-part. This methods finds it and errors if not possible.
If the given reference is a owning reference it finds the correct backReference, which can be found by checking all reference options.mappedBy.
If the given reference is a back reference it finds the owning reference, which can be found by using its options.mappedBy.
Alternatively we simply check for resolvedClassType to be given classType
, and if only one
found, we return it. When more than one found, we throw an error saying the user he
should make its relation mapping not ambiguous.
Returns references and back references.
Returns the ReflectionClass object from parent/super class, if available.
Static
fromOptional
classTypeIn: ReflectionClass<any> | ReceiveType<T> | AbstractClassType<T>Generated using TypeDoc
Reflection
never