Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Calling set with dot.separated key on a JSON/JSONB attribute will not flag the entire object as changed #4379
I'm using a JSONB attribute but I'm not able to save the data using set() on my instance object. When reading the documentation is says that using a dot.separated key should change the instance and flag the entire object as changed. If I inspect the instance object I can see that the "_changed" property now contains my dot.separated keys not the entire object key as expected.
Looking at the source code for instance.js I found a problem in the way changed is called when using a det.separated key. I have attached a pull request that actually flag the entire object as changed and I also make sure only to flag if a property has changed.