deadlinecode
Explore posts from serversDTDrizzle Team
•Created by deadlinecode on 1/16/2024 in #help
Single Selects don't work with JSON fields
Running:
- [email protected] (using bun:sqlite)
- [email protected]
It seems like tables with a
text("name", { mode: "json" })
column can only be selected if more than one entry get's selected (e.g. DB.query.Table.findMany().sync()
or DB.select().from(Table).all()
)
If i use .get()
or .findFirst()
it gives me a error containing this
It looks like this originated from the utils.js file line 28 or relations.js line 296 (basically everytime it hits mapFromDriverValue)
This is because for example the code in utils.js
Results in rawValue being undefined
because row is something like
Or any other object containing id and other key value columns and the code tries to index this object5 replies