-
-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix collection casing #1837
Fix collection casing #1837
Conversation
@@ -103,7 +107,7 @@ export function generateRepositories(dmmf: DMMF.Document, project: Project, base | |||
.addGetAccessor({ | |||
name: "collection" | |||
}) | |||
.setBodyText(`return this.prisma.${camelCase(model.name)}`); | |||
.setBodyText(`return this.prisma.${lowerCase(model.name)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that this fix doesn't have a change on unit test...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the difference between camelcase and this function...
Hello @partyka1 Also, your commit message doesn't follow the guideline rules - see commit angular convention. (a commit hook is here to prevent that). See you |
Pull Request Test Coverage Report for Build 2083791484
💛 - Coveralls |
@@ -103,7 +107,7 @@ export function generateRepositories(dmmf: DMMF.Document, project: Project, base | |||
.addGetAccessor({ | |||
name: "collection" | |||
}) | |||
.setBodyText(`return this.prisma.${camelCase(model.name)}`); | |||
.setBodyText(`return this.prisma.${lowerCase(model.name)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the difference between camelcase and this function...
this PR #1815 fix the issue. I close this PR ;) |
Information
Prisma generates collection name using
lowerCase
, instead ofcamelCase
https://github.com/prisma/prisma/blob/d7d33d896bcb104a56877fe4d87405f8200a63fc/packages/client/src/generation/TSClient/PrismaClient.ts#L225
Todos