duality icon indicating copy to clipboard operation
duality copied to clipboard

Duality Serializers should support updating an existing instance when loading

Open ilexp opened this issue 5 years ago • 0 comments

Summary

Right now, Duality serializers always return a new instance of a deserialized / loaded object. This should be extended to allow updating an existing instance.

Analysis

  • Deep instance re-use would be the ideal case, but will need further investigation.
  • Shallow instance re-use for only the provided top-level object could be some first iteration middle ground, but should only be done if significantly easier than the deep case, depending on investigation results.
  • A workaround in the mean time could be to deserialize into a new temp instance and use the cloning system to copy all values over to the existing instance.

ilexp avatar Sep 05 '20 10:09 ilexp