Is there a way to type objects that are from type ...
# orm-help
t
Is there a way to type objects that are from type
Json
I really want to have a typescript type but it should be stored in the database column as json. I can't find any issue for that - should I create one or is there a solution for that?
r
I stumbled upon this, too and wasn’t able to find a good solution. Is this related to #3219?
a
The issue linked above is definitely where the latest updates will take place. We recently landed a similar feature for MongoDB and will build off of that for relational DBs in the future 👍.
r
Hi @Tobias Lins this is probably not what you’re looking for but I created a validation getter function with with you can at least check if the JSON value is an object/array/boolean/string or whatever and works without type casting.