MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / load

Method load

packages/core/src/entity/BaseEntity.ts:197–197  ·  view source on GitHub ↗

* Ensures this entity is loaded (without reloading it if it already is). Returns the entity, or `null` if it * was not found in the database (e.g. it was deleted in the meantime, or active filters disallow loading it). * Use `loadOrFail()` if you want an error to be thrown in such a case.

(
    options?: LoadReferenceOptions<Entity, Hint, Fields, Excludes>,
  )

Source from the content-addressed store, hash-verified

195 * Use `loadOrFail()` if you want an error to be thrown in such a case.
196 */
197 load<
198 Entity extends this = this,
199 Hint extends string = never,
200 Fields extends string = never,

Callers 15

loadCountMethod · 0.65
initMethod · 0.65
loadFunction · 0.65
loadMethod · 0.65
GH6665.test.tsFile · 0.65
GH6031.test.tsFile · 0.65
dataloader.test.tsFile · 0.65
getRefsFunction · 0.65

Implementers 2

Referencepackages/core/src/entity/Reference.ts
ScalarReferencepackages/core/src/entity/Reference.ts

Calls

no outgoing calls

Tested by 2

getRefsFunction · 0.52
getColsFunction · 0.52