ScalarReference <Value>
Index
Constructors
Methods
Constructors
constructor
Parameters
optionalvalue: Value
initialized: boolean = ...
Returns ScalarReference<Value>
Methods
bind
Parameters
entity: Entity
property: EntityKey<Entity>
Returns void
isInitialized
Returns boolean
load
Parameters
optionaloptions: Omit<LoadReferenceOptions<any, any, *, never>, populate | fields | exclude>
Returns Promise<undefined | Value>
loadOrFail
Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity or throws an error just like
em.findOneOrFail()
(and respects the same config options).Parameters
options: Omit<LoadReferenceOrFailOptions<any, any, *, never>, populate | fields | exclude> = {}
Returns Promise<Value>
set
Parameters
value: Value
Returns void
unwrap
Returns undefined | Value
Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns either the whole entity, or the requested property.