PrismaP
Prisma•10mo ago•
3 replies
gogo te palobo

Enum mapped values in typedSQL

Hi! đź‘‹

I’m having trouble using enums with mapped values in typedSql. Here’s what I have:
enum Status {
  away
  appearOffline @@map("appear_offline")
}

And in SQL:
SELECT * FROM "User" WHERE "status"::text = ANY($1)

Prisma sends ['away', 'appearOffline'] instead of ['away', 'appear_offline'], which doesn’t match the DB values.

Prisma version: 6.3.1

Is this expected? Or am I missing something?

Thanks!
Was this page helpful?