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

PersistentCollection instance lost raw data during serialization/deserialization process. #1864

Closed
watari opened this issue Sep 21, 2018 · 1 comment
Labels
Milestone

Comments

@watari
Copy link
Contributor

watari commented Sep 21, 2018

Bug Report

Q A
Version 1.2.5

Summary

By default instance keep raw data from the database. So if you not accesses items from this collection before serialization, they will be not created from this raw data. This will cause lost of all data about items in collection during serialization/deserialization process.
I solved this problem for itself by redefining PersistentCollection class - I added call of 'initialize' method in '_sleep'.

How to reproduce

  1. Create instance of PersistentCollection with raw data.
  2. Serialize instance.
  3. Unserialize instance.
  4. At this point data will be lost.
@malarzm
Copy link
Member

malarzm commented Dec 27, 2018

Sorry this fell through the cracks, I'll close this issue to keep the conversation in one place since you've opened a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants