Page MenuHomePhabricator

Implement HierarchicalEntityStore
Closed, DeclinedPublic

Description

HierarchicalEntityStore should be an EntityStore decorator implementing the algorithm outlined in T165328 for storing sub-entities:

  • For non-hierarchical IDs, just delegate the call to the inner EntityStore.
  • For a hierarchical ID, get the parent ID and load the parent Entity using that ID.
    • Note: typically, the Entity that is going to be stored was previously loaded via an HierarchicalEntityRevisionLookup. So the parent Entity was already loaded as well. IMplementations should take care to make use of any cached instance already loaded into memory.
  • The parent entity must implement SubEntityContainer. Set the new sub-entity on the parent entity.
  • Store the modified parent entity

Event Timeline

Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.