From 8abca9b137e4d10ade8dc70d25df86b7998614c1 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:54:32 +0700 Subject: [PATCH] fix: error use select and include together --- src/controllers/00-stats-controller.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/controllers/00-stats-controller.ts b/src/controllers/00-stats-controller.ts index 8963099..849ca2c 100644 --- a/src/controllers/00-stats-controller.ts +++ b/src/controllers/00-stats-controller.ts @@ -134,19 +134,15 @@ export class StatsController extends Controller { ) { await prisma.$transaction(async (tx) => { const record = await tx.product.findMany({ - include: { - quotationProductServiceList: { - include: { - quotation: true, - }, - }, - }, select: { id: true, code: true, name: true, createdAt: true, updatedAt: true, + quotationProductServiceList: { + include: { quotation: true }, + }, _count: { select: { quotationProductServiceList: {