superduper
superduper copied to clipboard
Ensure init Method call `db.load` to Restore leaf Instances
trafficstars
After refactoring the code, we noticed that many encodables were not properly transformed during db.load, leading to the necessity of calling component.init() to restore the data to its correct state.
This issue affects the normal invocation of instance methods and properties. For example, when dealing with an uninitialized encodable instance, we had to use component.prop.x to access x instead of component.prop.
To address this, we need to ensure that the init method is called after db.load or import_item, restoring all data except for those supporting LAZY loading.