Skip to content

Module specific data -- "race" condition #35

@niniemann

Description

@niniemann

Situation

Some modules need to persist data. That's one reason why the PredefinedID exists: Allow a module to give it a never changing, known name.

Problem

When loading all entities and emitting their loaded() events, it may occur that an entity is to be processed by the module before its own specific entity is loaded() (and known to e.g. to the ActiveObjectStore). The module queries for its data, gets nothing in return, and thus creates a new entity with the same name. Which crashes when persisting it.
--> The order in which objects are loaded matters.

Solution

I don't know. Maybe allow modules to be persisted in general? Or add an initialization step that can be used to load the necessary entities first?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions