sdispater / orator

The Orator ORM provides a simple yet beautiful ActiveRecord implementation.

Home Page:https://orator-orm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The changes of dictionary property cannot save to db.

TokuiNico opened this issue · comments

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