Open shpekov-sk opened 1 year ago
When need to add different fields refer to the same model, app generates identical name for value field.
createdBy Person? @relation(fields: [personId], references: [id]) updatedBy Person? @relation(fields: [personId], references: [id]) personId String? personId String?
Would be cool to auto set value field name as relation field + model + key field. And set name for relation.
createdBy Person? @relation("createdByPersonId", fields: [createdByPersonId], references: [id]) updatedBy Person? @relation("updatedByPersonId", fields: [updatedByPersonId], references: [id]) createdByPersonId String? updatedByPersonId String?
When need to add different fields refer to the same model, app generates identical name for value field.
Would be cool to auto set value field name as relation field + model + key field. And set name for relation.
Funding