Open arsajib33 opened 1 month ago
i don't have access to the above shared schema, what's the error you see, and could you share a minimal schema to reproduce the error?
thanks for reporting! @arsajib33
datasource db { provider = "mongodb" url = env("DATABASE_URL") }
generator client { provider = "prisma-client-js" }
model Post { id String @id @default(auto()) @map("_id") @db.ObjectId
@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