drizzle-team / drizzle-team/drizzle-orm
[BUG]: "operator does not exist: jsonb = record" error when updating or deleting with a jsonb column in studio.
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
0.45.2
### What version of `drizzle-kit` are you using?
0.31.10
### Other packages
_No response_
### Describe the Bug
In the postgres database, I have a table with a jsonb column.
```
pgTable({
pair: jsonb.$type<[string,string]>().notNull(),
id: integer().primaryKey(),
})
```
If I then use drizzle studio to delete one or more rows, I get the error `operator does not exist: jsonb = record`, from the generated sql:
```
update "pair"
set
"pair" = '["new","test"]'
where
(
"id" = 2
and "pair" = ('old', 'test')
)
```
This also happens when deleting a row:
```
delete from "pair"
where
(
"id" = 2
and "pair" = ('old', 'test')
)
```
Contributor guide
Assessment
This issue has not been assessed yet.