The changes of dictionary property cannot save to db.
TokuiNico opened this issue · comments
chyulin commented
When I set a dict
cast to a model, any changes of dict property doesn't affect the real value.
And can't save the change to db.
class Test(Model):
__table__ = 'test'
__casts__ = {
'json_field': 'dict'
}
test_obj = Test.find(1)
test_obj.json_field['new_data'] = 1 # update json_field
test_obj.save() # nothing happened