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

Method loadOrFail

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

* Ensures this entity is loaded (without reloading it if it already is). Returns the entity, or throws an error * just like `em.findOneOrFail()` (and respects the same config options) if it was not found.

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

Source from the content-addressed store, hash-verified

208 * just like `em.findOneOrFail()` (and respects the same config options) if it was not found.
209 */
210 loadOrFail<
211 Entity extends this = this,
212 Hint extends string = never,
213 Fields extends string = never,

Implementers 2

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

Calls

no outgoing calls

Tested by

no test coverage detected