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

Method loadItems

packages/core/src/entity/Collection.ts:129–134  ·  view source on GitHub ↗

* Initializes the collection and returns the items

(
    options?: InitCollectionOptions<TT, P>,
  )

Source from the content-addressed store, hash-verified

127 * Initializes the collection and returns the items
128 */
129 async loadItems<TT extends T, P extends string = never>(
130 options?: InitCollectionOptions<TT, P>,
131 ): Promise<Loaded<TT, P>[]> {
132 await this.load(options);
133 return this.getItems(false) as Loaded<TT, P>[];
134 }
135
136 /**
137 * Gets the count of collection items from database instead of counting loaded items.

Calls 2

loadMethod · 0.95
getItemsMethod · 0.95

Tested by

no test coverage detected