For Rust-free, what's the rationale for adding "Model" suffixes to every generated model export in P

Can anyone from the Prisma team explain the rationale behind renaming every single model export to now include a Model suffix at the end of each type (for example, UserModel, PostModel, etc.)? I'm curious what motivated this change, and why that same naming convention isn’t applied to the browser types in the generated Prisma Client. https://www.prisma.io/docs/orm/prisma-schema/overview/generators#4-use-prisma-client-in-your-application
Generators (Reference) | Prisma Documentation
Generators in your Prisma schema specify what assets are generated when the prisma generate command is invoked. This page explains how to configure generators.
No description
5 Replies
Prisma AI Help
Prisma AI Help2mo ago
Ahoy, knowledge seeker! I'm the Prisma AI Help Bot. Do you want a dev's response that might take a hot second, or an AI answer that's ready before your next coffee sip? Either way, your question is important to us.
sylvester stallone
sylvester stalloneOP2mo ago
also why do absolutely all type inferences break in the new prisma version? how is this possible? why has it become so garbage?
sylvester stallone
sylvester stalloneOP2mo ago
just look at all these errors in one file alone
No description
Gregersen
Gregersen2mo ago
Without knowing why, I'd guess that the Model suffix is added because it more accurately reflects what it is. You don't have to use them though, or at least I haven't seen the need to convert. As for the type inference, what exactly is breaking for you? We recently updated to follow the new guidelines for generated output folder, and despite a few complications with getting the conversion across the finish line it has been very smooth. We've not had to change almost any imports, rename anything. The only thing that is a bit cumbersome is the lack of integration with prisma-json-types-generator. Could these errors be happening because your import at the top has broken, and so all the types on the Prisma or PrismaClient import, are broken?

Did you find this page helpful?