Is there a way to use enum types in Kysely query conditions.
I have enum types defined in prisma schema.
enum MyEnumb {
VALUE1
VALUE2
}
model Model1 {
id Int @id @default(autoincrement())
col1 MyEnumb
}
When I attempt to use MyEnumb in conditions, I get en error.
await prisma.$kysely
.selectFrom("Model1")
.where("Model1.col1", "=", MyEnumb.VALUE1)
.select(["id"])
.execute();
The error:
ERROR: operator does not exist: "Model1" = text
Are there any workarounds except raw queries?