© 2026 Hedgehog Software, LLC
await prisma.item.create({ data: { order: 1, sectionId: "1", itemTags: { create: [ { tagId: "1", }, ], }, }, });
await prisma.item.createMany({ data: [ { order: 1, sectionId: "1", itemTags: { create: [ { tagId: "1", }, ], }, }, ], });
model Tag { ...stuff itemTags ItemTag[] } model ItemTag { id String @default(cuid()) itemId String tagId String item Item @relation(fields: [itemId], references: [id]) tag Tag @relation(fields: [tagId], references: [id]) @@id([itemId, tagId]) } model Item { ...stuff itemTags ItemTag[] }