prisma-client "Model" suffix?
The "prisma-client" early access docs say to import models like this
However, all the models seem to have "Model" appended to the end, e.g.
UserModel, PostModel, etc.
Is this due to a recent change? Is there a pull request when this changed?
Is this expected behavior? Is there any way to customize this?4 Replies
You selected to wait for the human sages. They'll share their wisdom soon.
Grab some tea while you wait, or check out
#ask-ai if you'd like a quick chat with the bot anyway!I think the docs are wrong. It looks like I am able to access the proper model by doing
I would really prefer if the model file exported the correct name
Otherwise I am stuck importing the client when I only want the models / enums
GitHub
ESM Model Name suffix · Issue #27531 · prisma/prisma
Bug description Hi there, This PR changed the ESM model exports to have a Model suffix: https://github.com/prisma/prisma/pull/26727/files#diff-264ddc34afc7c904dfe0af24b2b265ed27299067e62c224a007c55...
Thanks for raising the issue.
If I understand correctly, the docs should say
instead of
right?