JSON with PostgreSQL not serializing correctly
I have define my field like this:
Which looks fine when I look at the table structure.
Now I have the following object I'm creating/updating, which has a string[] as hostnames:
After this is added, the value in the database is escaped like this:
This does not look correct, it looks like wrongly serialized. Or what am I doing wrong here?
The following SQL should extract the first value, however because it's wrongly serialized, it gives me the JSON serialization as the first value:
2 Replies
All right, I can see that its a bug :/ https://github.com/drizzle-team/drizzle-orm/issues/724
GitHub
[BUG]: jsonb always inserted as a json string when using postgres-j...
What version of drizzle-orm are you using? 0.26.5 What version of drizzle-kit are you using? 0.18.1 Describe the Bug Inserting an object into a postgres jsonb field with db.insert only inserts a st...
thought this was fixed? guess not