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

Method expandItem

packages/core/src/utils/QueryHelper.ts:531–534  ·  view source on GitHub ↗
(item: unknown)

Source from the content-addressed store, hash-verified

529 ? this.extractPolymorphicJoinColumnValues(entity, prop)
530 : this.extractJoinColumnValues(entity, prop);
531 const expandItem = (item: unknown) => {
532 const entity = Reference.isReference(item) ? item.unwrap() : item;
533 return Utils.isEntity(entity) ? expand(entity) : item;
534 };
535 const w = where[k];
536 const expanded = expandItem(w);
537

Callers

nothing calls this directly

Calls 3

isReferenceMethod · 0.80
unwrapMethod · 0.45
isEntityMethod · 0.45

Tested by

no test coverage detected