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

Method isCollection

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

* Creates new Collection instance, assigns it to the owning entity and sets the items to it (propagating them to their inverse sides)

(item: any)

Source from the content-addressed store, hash-verified

76 * Creates new Collection instance, assigns it to the owning entity and sets the items to it (propagating them to their inverse sides)
77 */
78 static isCollection<T extends object, O extends object>(item: any): item is Collection<T, O> {
79 return item != null && Object.hasOwn(item, collectionSymbol);
80 }
81
82 static create<T extends object, O extends object = object>(
83 owner: O,

Callers 4

assignPropertyMethod · 0.45
propagateMethod · 0.45
populateFieldMethod · 0.45
filterCollectionsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected