I got a schema like this and when I checked the da...
# orm-help
f
I got a schema like this and when I checked the database there was no foreign key set for the
UserMeta
table and I cannot use @relation because Prisma then tells me, that the relation already exists and I only have to provide it in one of the tables
m
Copy code
model User {
  id       Int      @id @default(autoincrement())
  email    String   @unique
  meta     UserMeta? 
  @@map("user")
}
model UserMeta {
  id      Int    @id @default(autoincrement())
  userId  Int    @unique
  user    User   @relation(fields: [userId], references: [id])
  @@map("user_meta")
}
🙌 1