Skip to main content
Version: Next

ScalarReference <Value>

Index

Constructors

constructor

  • Parameters

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

    Returns ScalarReference<Value>

Methods

bind

  • bind(entity, property): void
  • Parameters

    Returns void

isInitialized

  • isInitialized(): boolean
  • Returns boolean

load

  • load(options): 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>

loadOrFail

  • loadOrFail(options): Promise<Value>
  • 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

    Returns Promise<Value>

set

  • set(value): void
  • Parameters

    • value: Value

    Returns void

unwrap

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