Error when generating from schema with polymorphic models - given constraint name ...
has to be unique in the following namespace...
#1058
Labels
Milestone
Description and expected behavior
I've been playing around with the 2.0 polymorphic features of zenstack and ran into an issue I can't seem to get around / find documented here:
"Generating Prisma schema" completes successfully but I run into the following error during "Generating PrismaClient enhancer"
Here is a simplified version of my schema.zmodel:
Based on the error message, I think a possible solution would be to add a map property to the relation attribute as it suggests. When I go in and modify
node_modules\.zenstack\delegate.prisma
just to try it out, the IDE error goes away at least so I think its promising. Maybe on generation this should be added? Or an option to specify this somewhere in the zmodel?Environment (please complete the following information):
Additional context
Oddly enough changing the generator provider to
sqlite
seems to remedy the issue (something prisma related?) but I was hoping to use postgresqlThanks
-Andrew
The text was updated successfully, but these errors were encountered: