https://www.prisma.io/ logo
#orm-help
Title
# orm-help
a

A. Sauder

09/26/2022, 6:51 AM
Hello Is there any way from prism itself to generate classes instead of type? Especially for the automapper I would need classes.
1
n

Nurul

09/26/2022, 7:17 AM
Hey 👋 Can you have a look at this community generator: prisma-class-generator?
a

A. Sauder

09/26/2022, 8:46 AM
Thanks for the hint. I have already tried that. It also writes during generation which classes it has created, but then the _gen directory in src/ does not exist.
y

Yudhvir Raj

09/26/2022, 9:19 AM
I have help with this! I ran the generator & although it is nice, it is missing some functionality. I’m writing a new one inspired by it. In the mean time to run it make sure you set dryRun to false in the generator options
a

A. Sauder

09/26/2022, 1:27 PM
Now it worked. The classes are created. Thank you. The hint with the dryRun was crucial.
❤️ 1
n

Nurul

09/27/2022, 8:27 AM
Thanks for the hint Yudhvir 👍 I wasn’t aware of it either, This will help other users who might run into this later.
❤️ 1
3 Views