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

Function getCols

tests/features/dataloader/dataloader.test.ts:575–583  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

573
574 test('Collection.load with where (One to Many)', async () => {
575 const getCols = async () => {
576 const em = orm.em.fork();
577 return [
578 // (await em.findOneOrFail(Author, { id: 1 })).books,
579 // (await em.findOneOrFail(Author, { id: 1 })).books,
580 // (await em.findOneOrFail(Author, { id: 1 })).books,
581 ...(await em.find(Author, { id: [1, 2, 3] })).map(({ books }) => books),
582 ];
583 };
584 const colsA = await getCols();
585 const colsB = await getCols();
586 /*

Callers 1

dataloader.test.tsFile · 0.85

Calls 11

populateDatabaseFunction · 0.85
getCollectionsFunction · 0.85
forkMethod · 0.80
findMethod · 0.65
initMethod · 0.65
createMethod · 0.65
loadMethod · 0.65
closeMethod · 0.65
mockLoggerFunction · 0.50
mapMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected