Peter Kellner
02/08/2022, 12:42 AMmodel DiscussionItem {
Id Int @id(map: "PK__Discussi__3214EC0771E234E0") @default(autoincrement())
DiscussionId Int
AttendeesId Int
DateEntered DateTime @db.DateTime
MessageText String @db.NVarChar(4000)
Attendees Attendees @relation(fields: [AttendeesId], references: [Id], onUpdate: NoAction, map: "DiscussionItem_fk")
}
The real hassle is that all of the schema begins with uppercase "I" and I want those properties to translate easily to camelcase on the ApolloServer side. That is, id, attendeesId, discussionId, etc.
The issue is the accepted norm for database columns is begin with capital, the accept norm for JavaScript variables is begin with lowercase.
Is there an option for that?Austin Zentz
02/08/2022, 2:56 AMAustin Zentz
02/08/2022, 2:56 AMAustin Zentz
02/08/2022, 2:57 AMid Int @map("Id")
Austin Zentz
02/08/2022, 2:57 AM