Skip to content

fix: Filter unknown property while deserializing#6

Open
VitSoonYoung wants to merge 1 commit into
Cretezy:mainfrom
VitSoonYoung:main
Open

fix: Filter unknown property while deserializing#6
VitSoonYoung wants to merge 1 commit into
Cretezy:mainfrom
VitSoonYoung:main

Conversation

@VitSoonYoung

Copy link
Copy Markdown

Problem
After saving data, rename a property of the data class cause deserialization error: Key doesn't exist.
This makes the deserialization failed and completely ignored in production, causing data lost if dev makes an update to the data model.

Fix
Get the properties list of the instance to only assign to the property and ignore unrelated fields.

Note: There are another bug about changing property's type causing the same issue, I might put it on another PR since there are more typing conditions to handle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant