You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a model which uses EnumType from sqlalchemy called category.
When I try to dump some information in my schema with Related(column='category')
It throws an error that Enum cannot be serialized to JSON
Is there a way for me to let ma-sqla know that this field should be dumped using a field I have created called EnumField which handles the serialization and deserialization logic ?
I guess Related is currently assuming it can take the value from the DB directly. So, maybe we need a Related(column='category', column_field=EnumField) or something which is used to serialize/deserialize the value
The text was updated successfully, but these errors were encountered:
I have a model which uses EnumType from sqlalchemy called
category
.When I try to dump some information in my schema with
Related(column='category')
It throws an error that Enum cannot be serialized to JSON
Is there a way for me to let ma-sqla know that this field should be dumped using a field I have created called
EnumField
which handles the serialization and deserialization logic ?I guess Related is currently assuming it can take the value from the DB directly. So, maybe we need a
Related(column='category', column_field=EnumField)
or something which is used to serialize/deserialize the valueThe text was updated successfully, but these errors were encountered: