Why jsonArrayFrom converts a Generated<number> field into string | number?

Look at this pic
No description
Solution:
Since you're not using table specifiers, are you sure some "parent" table doesn't also have those columns and you are actually selecting them?
Jump to solution
5 Replies
thelinuxlich
thelinuxlichOP14mo ago
using a $castTo solves it, but I'd like to understand the behavior
No description
thelinuxlich
thelinuxlichOP14mo ago
another weird type change, here country and state aren't nullable but jsonObjectFrom changes them:
No description
Solution
koskimas
koskimas14mo ago
Since you're not using table specifiers, are you sure some "parent" table doesn't also have those columns and you are actually selecting them?
koskimas
koskimas14mo ago
It's much easier to help if you provide a playground or even the full code as a text
thelinuxlich
thelinuxlichOP14mo ago
you nailed it, I feel so dumb! thanks a lot @koskimas
Want results from more Discord servers?
Add your server