Skip to main content
Version: Next

LoadedReference <T>

Hierarchy

Index

Properties

$

$: NonNullable<T>

Methods

get

  • get(): NonNullable<T>
  • Returns NonNullable<T>

inheritedgetEntity

  • getEntity(): NonNullable<T>
  • Returns NonNullable<T>

inheritedgetProperty

  • getProperty(prop: K): NonNullable<T>[K]
  • Parameters

    • prop: K

    Returns NonNullable<T>[K]

inheritedisInitialized

  • isInitialized(): boolean
  • Returns boolean

inheritedload

  • Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity. If the entity is not found in the database (e.g. it was deleted in the meantime, or currently active filters disallow loading of it) the method returns null. Use loadOrFail() if you want an error to be thrown in such a case.


    Parameters

    Returns Promise<null | Loaded<TT, P, F, E>>

inheritedloadOrFail

  • 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<Loaded<TT, P, F, E>>

inheritedloadProperty

inheritedpopulated

  • populated(populated?: boolean): void
  • Parameters

    • optionalpopulated: boolean

    Returns void

inheritedtoJSON

  • Parameters

    • rest...args: any[]

    Returns Dictionary

inheritedunwrap

  • unwrap(): NonNullable<T>
  • Returns NonNullable<T>