-
Is it required to CustomPrismaModule/CustomPrismaService? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
After exploring more, I see the following are required when prisma custom client location is used. Please correct me if wrong anywhere... 1] Use of CustomPrismaModule/CustomPrismaService (not to use PrismaModule/PrismaService anywhere) 2] Use Custom Location for referencing PrismaClient (not to use @prisma/client anywhere)
3] Use CustomPrismaModule to register unique PrismaClient
4] Use for Injection CustomPrismaService (not to use PrismaService from @prisma/client)
5] Use prisma.client instead of prisma to interact with db. (or create another local variable prisma and assign cpsService.client to it.
6] In test, use |
Beta Was this translation helpful? Give feedback.
After exploring more, I see the following are required when prisma custom client location is used. Please correct me if wrong anywhere...
1] Use of CustomPrismaModule/CustomPrismaService (not to use PrismaModule/PrismaService anywhere)
2] Use Custom Location for referencing PrismaClient (not to use @prisma/client anywhere)
3] Use CustomPrismaModule to register unique PrismaClient
4] Use for Injection CustomPrismaService (not to…