Prisma Version: 2.30.3 Guys i'm trying to explain...
# orm-help
b
Prisma Version: 2.30.3 Guys i'm trying to explain my problem so i edited the message: The following works as intended:
Copy code
TableA {
  fieldA_id int
  fieldA  Gene    @relation(fields: [fieldA_id], references: [id])
}
Gene {
  ...
  TableA TableA[]
}
But after i changed the Gene TableA to use 2 fields but same opposition relationship it stops to works: like:
Copy code
fieldA_id int
fieldB_id int
fieldA  Gene    @relation(name: "field_a_pk", fields: [fieldA_id], references: [id])
fieldB  Gene    @relation(name: "field_b_pk", fields: [fieldB_id], references: [id])
error: WomanCareInfo = TableA in this case.
Copy code
error: Error validating field `gene_loc_1` in model `WomanCareInfo`: The relation field `gene_loc_1` on Model `WomanCareInfo` is missing an opposite relation field on the model `Gene`. Either run `prisma format` or add it manually.
  -->  schema.prisma:335
   | 
334 | 
335 |   gene_loc_1 Gene @relation(name: "gene_1_pk", fields: [gene_1_id], references: [id])
336 |   gene_loc_2 Gene @relation(name: "gene_2_pk", fields: [gene_2_id], references: [id])
   | 
error: Error validating field `gene_loc_2` in model `WomanCareInfo`: The relation field `gene_loc_2` on Model `WomanCareInfo` is missing an opposite relation field on the model `Gene`. Either run `prisma format` or add it manually.
  -->  schema.prisma:336
   | 
335 |   gene_loc_1 Gene @relation(name: "gene_1_pk", fields: [gene_1_id], references: [id])
336 |   gene_loc_2 Gene @relation(name: "gene_2_pk", fields: [gene_2_id], references: [id])
337 |
is this a sort of bug?
👍 1