ef7da3486a
If this works out I think we'll want to use this approach for all data layer changes. Previously, an unsaved change on an object would update its state immediately, which was fine for synchronous code but breaks down if a save involves multiple asynchronous calls, because modifying state after the relevant data has been saved to the DB but before the `_changed` object has been cleared would mean that new changes would be lost. Now, changes are written to _changedData, and a get for the data first checks _changedData before checking the state property (e.g., _tags) directly. The changedData property is cleared as it's written, and once the object is saved, the reload updates the state property with the new data. |
||
---|---|---|
.. | ||
content | ||
locale | ||
skin/default/zotero |