zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.07k stars 88 forks source link

Prisma schema validation error - Relation map argument is too long #1466

Closed ruizehung closed 4 months ago

ruizehung commented 4 months ago

Description and expected behavior When I use polymorphic feature withs models that have long names, I got Prisma schema validation error due to long map argument in @relation constraint. The maximum allowed length is 63 bytes for PostgreSql. The issue can be temporarily fixed by manually replacing the generated map argument with a shorter string.

I can see myself easily getting this error as I have descriptive model names.

Screenshots image

Environment (please complete the following information):

Additional context N/A

ymc9 commented 4 months ago

Fixed in v2.2.0