Β© 2026 Hedgehog Software, LLC
const results = await prisma.orders.findMany({ select: { ..., products_orders_order_product_idToproducts: { select: { orders: { select: { clients: { select: { name: true, }, }, }, }, }, }, }, }); return results.map((row) => ({ ... name: row.products_orders_order_product_idToproducts?.orders .clients?.name, // No TypeScript error }));
options
const options: Prisma.ordersFindManyArgs = { select: { ..., products_orders_order_product_idToproducts: { select: { orders: { select: { clients: { select: { name: true, }, }, }, }, }, }, }, }); const results = await prisma.orders.findMany(options) return results.map((row) => ({ ... name: row.products_orders_order_product_idToproducts?.orders .clients?.name, // TypeScript error here }));
Property 'products_orders_order_product_idToproducts' does not exist on type { ... }