หยอมแหยม
หยอมแหยม
Explore posts from servers
DTDrizzle Team
Created by หยอมแหยม on 3/3/2024 in #help
Recursive table
how to make recursive such as category inside category?
3 replies
DTDrizzle Team
Created by หยอมแหยม on 7/25/2023 in #help
How to do this in drizzle schema?
I moved from PrismaORM convert this model schema to drizzleSchema (nested self) How to do that?
model Category {
id Int @id @default(autoincrement())
name String
parentId Int?
parent Category? @relation("ParentChild", fields: [parentId], references: [id])
children Category[] @relation("ParentChild")
Product Product[]
}
model Category {
id Int @id @default(autoincrement())
name String
parentId Int?
parent Category? @relation("ParentChild", fields: [parentId], references: [id])
children Category[] @relation("ParentChild")
Product Product[]
}
1 replies