docs
docs copied to clipboard
Fix code snippet won't compile issue
The original code won't compile with TS compiler, due to the missing field content in the data. Add the field to eliminate compiler error.
@onlyice is attempting to deploy a commit to the Prisma Team on Vercel.
A member of the Team first needs to authorize it.
Hi @onlyice ,
That shouldn't be the case. The Post model's content field is marked as optional:
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
}
Could you confirm that your model is set up correctly?
Hi @jharrell, I can confirm that the problem is caused by the reason you stated. Thanks for your reply.