You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the Prisma client location is configurable, we might be able to have multiple extension instances that solves the problem of multiple database clients, but I am not sure how to make import { Prisma } from "xxx" to be dynamically configurable. I am happy to help with the changes if I could get some directions.
Another potential workaround is just to make DMMF configurable as mentioned in olivierwilkinson/prisma-extension-nested-operations#7 (comment), however, it requires using Zod to define types like DMMF field in order to decouple the reference on types like Prisma.DMMF.Field, and I am not sure if we will be able to decouple all Prisma references except DMMF.
As a dirty workaround for whoever is struggling with this issue, I am using patch-package to patch node_modules/prisma-extension-soft-delete/dist/lib/createSoftDeleteExtension.js, node_modules/prisma-extension-soft-delete/dist/lib/helpers/createParams.js and node_modules/prisma-extension-nested-operations/dist/lib/utils/relations.js to load from my custom client path instead of @prisma/client, but this only solves the custom output location problem, and it still won't work with multiple database clients.
Any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered:
Hi,
This library and its dependency prisma-extension-nested-operations don't support Prisma custom output path, as both of the libraries assume the Prisma client path to be
@prisma/client
(e.g. https://github.com/olivierwilkinson/prisma-extension-soft-delete/blob/main/src/lib/createSoftDeleteExtension.ts#L1, olivierwilkinson/prisma-extension-nested-operations#7). And as a result, it also doesn't support multiple Prisma database clients which has multiple client output locations.If the Prisma client location is configurable, we might be able to have multiple extension instances that solves the problem of multiple database clients, but I am not sure how to make
import { Prisma } from "xxx"
to be dynamically configurable. I am happy to help with the changes if I could get some directions.Another potential workaround is just to make DMMF configurable as mentioned in olivierwilkinson/prisma-extension-nested-operations#7 (comment), however, it requires using Zod to define types like DMMF field in order to decouple the reference on types like
Prisma.DMMF.Field
, and I am not sure if we will be able to decouple allPrisma
references except DMMF.As a dirty workaround for whoever is struggling with this issue, I am using patch-package to patch node_modules/prisma-extension-soft-delete/dist/lib/createSoftDeleteExtension.js,
node_modules/prisma-extension-soft-delete/dist/lib/helpers/createParams.js
andnode_modules/prisma-extension-nested-operations/dist/lib/utils/relations.js
to load from my custom client path instead of@prisma/client
, but this only solves the custom output location problem, and it still won't work with multiple database clients.Any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered: