I have an entity defined "Board" in prisma.schema like this:
model Board {
id String @id @default(uuid())
createdAt DateTime @default(now()) @ignore
updatedAt DateTime @updatedAt @ignore
title String
posts Post[]
Team Team @relation(fields: [teamId], references: [id])
teamId String
}
After using prisma for a while, now the prisma.board.create
function is unavailable (I think it was at around the time I added updatedAt)
I do have access to the rest of the functions, but trying to use create
gives no autocomplete and this error:
Property 'create' does not exist on type 'BoardDelegate'.ts(2339)
What am I doing wrong?
What are the usual cases for create
not existing when the rest of the methods are there?
I added "?" sign to these field and it worked:
model Board {
...
createdAt DateTime? @default(now()) @ignore
updatedAt DateTime? @updatedAt @ignore
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With