Closed lroal closed 2 months ago
const order = await db.order.getById(1, { lineCount: x => x.count(x => x.lines) }); console.dir(order.lineCount);
With filter
const order = await db.order.getById(1, { lineCount: x => x.count(x => x.lines, { lines: { where: x => x.product.contains('broomstick'), limit: 20, orderBy: } }) }); console.dir(order.lineCount);
With filter