Skip to main content
Version: 6.4

ScalarReference <Value>

Index

Constructors

constructor

  • new ScalarReference(value?: Value, initialized?: boolean): ScalarReference<Value>
  • Parameters

    • optionalvalue: Value
    • initialized: boolean = ...

    Returns ScalarReference<Value>

Methods

bind

  • bind(entity: Entity, property: EntityKey<Entity>): void
  • Parameters

    Returns void

isInitialized

  • isInitialized(): boolean
  • Returns boolean

load

  • load(options?: Omit<LoadReferenceOptions<any, any, *, never>, populate | fields | exclude>): Promise<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.


    Parameters

    Returns Promise<undefined | Value>

set

  • set(value: Value): void
  • Parameters

    • value: Value

    Returns void

unwrap

  • unwrap(): undefined | Value
  • Returns undefined | Value