node-casbin / prisma-adapter

Prisma adapter for Casbin
Apache License 2.0
31 stars 18 forks source link

[BUG] How to support a specified directory for the Prisma Client? #53

Closed Lce-Lemon closed 5 days ago

Lce-Lemon commented 11 months ago

When I modify the generated directory for Prisma, the adapter doesn't work properly.

casbin-bot commented 11 months ago

@nodece @Shivansh-yadav13

hsluoyz commented 11 months ago

@Lce-Lemon Prisma is an ORM, what do you mean by the "generated directory for Prisma"? Can you provide a full example code?

Lce-Lemon commented 11 months ago

Prisma is an ORM, what do you mean by the "generated directory for Prisma"? Can you provide a full example code?

Please look here

hsluoyz commented 1 week ago

Then I think we can provide an optional argument in this adapter to allow users to specify the directory for the Prisma Client

tx2002 commented 5 days ago

@Lce-Lemon Thank you for your feedback! Adapting to a custom generator output path is quite challenging for us. We would suggest modifying the source code of the casbin-prisma-adapter manually to import the relevant Prisma generator classes from your custom output path. https://github.com/search?q=repo%3Anode-casbin/prisma-adapter%20%27%40prisma/client%27&type=code

hsluoyz commented 5 days ago

Closed as resolved