Fetching typed json fields
metmirr opened this issue · 7 comments
@metmirr Are you sure that record has a value in the DB?
Fixed in #467
Note that I needed to update the behavior of the Fields
decorator to include all top-level fields. This will bring along both JSON fields as well as associations. Then BaseModel
makes sure all values passed into find
are actually fields on the table. This is technically a breaking change - but I'd argue the Fields
decorator wasn't really working as designed anyway. Do you think this is ok, or should I create a new decorator with the new behavior?
I've merged this. Feel free to play around and let me know if you think anything needs to be tweaked.
Note that I needed to update the behavior of the
Fields
decorator to include all top-level fields. This will bring along both JSON fields as well as associations. ThenBaseModel
makes sure all values passed intofind
are actually fields on the table. This is technically a breaking change - but I'd argue theFields
decorator wasn't really working as designed anyway. Do you think this is ok, or should I create a new decorator with the new behavior?
I think this is it, the decorator is working as expected with jsons, relations etc.
I've merged this. Feel free to play around and let me know if you think anything needs to be tweaked.
Working perfectly as expected, thank you so much! Really appreciated!