You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model Post {
id String @id@default(auto()) @Map("_id") @db.ObjectId
MongoDB @default(auto()) fields must have ObjectId native type.
slug String @unique
title String
body String
author User @relation(fields: [authorId], references: [id])
authorId String @db.ObjectId
comments Comment[]
}
model User {
id String @id@default(auto()) @Map("_id") @db.ObjectId
email String @unique
name String?
address Address?
posts Post[]
}
model Comment {
id String @id@default(auto()) @Map("_id") @db.ObjectId
comment String
post Post @relation(fields: [postId], references: [id])
postId String @db.ObjectId
}
// Address is an embedded document
type Address {
street String
city String
state String
zip String
}
https://prisma-editor.vercel.app/schema/10179
above code i copied from peisma website but your app is showing error
The text was updated successfully, but these errors were encountered: