Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialize already serialized istance of class failed when i add field to class #99

Open
StefanoAnversa opened this issue Dec 7, 2021 · 0 comments

Comments

@StefanoAnversa
Copy link

Good morning,

i have this problem.
I serialized a istance of my class "Area" and i save it on Redis Repository.
The "Area" class has a list of item WorkCenter
This is the old definition of "WorkCenter"

image

Now i edited the class and i add new field and added on Empy Constructor the default value of new field
image

Now when i try to deserialize istance saved on Redis with new definition (i use the deserialize method with generic type) i get this error:

"Index was out of range. Must be non-negative and less than the size of the collection. Arg_ParamName_Name"

Do you have any idea how I can fix this?

On this link: "https://github.com/rikimaru0345/Ceras/wiki/Optimization-&-Pitfalls" is written that "Ceras supports removing, renaming, and adding new fields (or properties), but changing the type of an existing member will not work. If you need that feature let me know and I'll add it".
So I expected that adding a field would have no problems but it isn't.

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

No branches or pull requests

1 participant