PrismaP
Prisma17mo ago
1 reply
u007

inconsistant use of id field and relation create

why is this createMany in relation somehow is using siteId instead of site: connect?

```const oldChat = await prisma.chat.create({data: {
token: generateRandomString(),
module: {
connect: {
id: moduleId
},
},
chatProfile: {
connect: {
id: chatProfileId
}
},
Message: {
createMany: {
data: Array(40).fill({
role: 'USER', msgContent: 'Test message',
siteId: site.id,
// site: {
// connect: {
// id: site.id,
// }
// }
}),
},
},
}})
Was this page helpful?