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

add loaded signal to entity backend and delay entity override loading #160

Closed
wants to merge 0 commits into from

Conversation

nkrisc
Copy link
Contributor

@nkrisc nkrisc commented Dec 6, 2023

Description

Draft PR to fix array contents not being deserialized during loading when an entity contains override values for an array property.

This PR adds a signal to PandoraEntityBackend to indicate when loading is completed. On PandoraEntity, loading of overrides is delayed until that signal is emitted. This is because the root cause of the issue is that when the overrides are loaded, the properties have not yet been fully loaded and thus it's not (currently) possible to check the type setting of the array.

There are some other ways this could be solved though:

  • Storing the array type with the serialized entity overrides
  • Deserializing properties first and threading settings through the loading process to where the overrides are loaded

This issue would also likely affect any future types that contain other types, such as Dictionary.

The unit test is currently still failing, though in practice the issue seems at least initially resolved, but there may be other affected cases yet.

Addressed issues

TODO

  • Ensure importing works and is unaffected

@nkrisc
Copy link
Contributor Author

nkrisc commented Dec 13, 2023

Not how I meant to close it, but I will open a new PR with a complete different approach to this issue, that I also think could set a precedent for a dictionary type as well.

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