x
This commit is contained in:
1 parent
c23a4723ed
commit
07e9413a6b
13 files changed
+497
-94
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
const prisma = new PrismaClient();
|
||||
prisma.product.findMany({
|
||||
include: {
|
||||
category: { include: { translations: true } },
|
||||
brand: true,
|
||||
translations: true,
|
||||
variants: {
|
||||
include: {
|
||||
bomItems: { include: { rawMaterial: true } }
|
||||
},
|
||||
orderBy: { price: "asc" }
|
||||
},
|
||||
images: { orderBy: { order: "asc" } },
|
||||
}
|
||||
}).then(console.log).catch(console.error).finally(() => prisma.$disconnect());
|
||||
Reference in new issue
Block a user