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

Function includes

packages/sql/src/AbstractSqlDriver.ts:1708–1708  ·  view source on GitHub ↗
(arr: T[][], item: T[])

Source from the content-addressed store, hash-verified

1706 const pks = wrapped.getPrimaryKeys(true)!;
1707 const snap = coll.getSnapshot();
1708 const includes = <T>(arr: T[][], item: T[]) => !!arr.find(i => this.comparePrimaryKeyArrays(i, item));
1709 // For union-target polymorphic M:N, prepend the per-row discriminator value so the pivot
1710 // persister can write it alongside the FK id. Memoized per sync-run because a collection can
1711 // hold hundreds of items of the same few types, and findDiscriminatorValue walks the prototype

Callers 1

syncCollectionsFunction · 0.85

Calls 1

findMethod · 0.65

Tested by

no test coverage detected