abstract model Base {
id String @id @default(uuid())
}
model User extends Base {
email String
posts Post[]
@@allow('all', auth() == this)
}
model Post {
id String @id @default(uuid())
user User @relation(fields: [userId], references: [id])
userId String
@@allow('all', auth().id == userId)
}
It will shows error:
Could not resolve reference to DataModelField named 'id'.zmodel(linking-error)