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

Deleting an ontology register causes other registers to appear empty #103

Open
bwmcbride opened this issue Feb 21, 2019 · 1 comment
Open

Comments

@bwmcbride
Copy link

bwmcbride commented Feb 21, 2019

Symptoms:

After deleting an ontology register, other registers which contained entries with a type defined in the deleted ontology were reported as empty. Attempting to reload entries into the apparently empty registers failed with an error report that an entry that was being reloaded already existed.

To reproduce (all operations via the UI):

  1. create a register test to contain two test registers
  2. within test create ontology register ont and load the attached ontology file ont.ttl
  3. within test create register entry and load the attached data file entries.ttl
  4. verify the entity entry register has one member entry/1
  5. use the SPARQL form to list the properties of the .../test/entry/_1 resource. Note it has a property reg:itemClass that is defined in the .../test/ont register.
  6. delete the register ont
  7. verify the entity register now shows up as empty in the UI
  8. use the SPARQL form to show that the reg:itemClass property has disappeared from .../test/entry/_1.

Investigation:

Exploration of the code finds the method listMembers in class StoreBaseImpl. This uses the query REGISTER_LIST_QUERY to find members of a register and this query requires register members to have a reg:itemClass property or it won't find them.

Hypothesis:

Deleting an ontology incorrectly deletes reg:itemClass triples in the triple store if they refer to classes defined in the deleted ontology.

registry version: 2.0

ont.ttl.txt
entries.ttl.txt

@simonoakesepimorphics
Copy link
Contributor

On deleting a registry item, all of the triples which have that item as their object are also deleted, so your hypothesis is correct. This is intentional, however every entity is expected to have a reg:itemClass value. It's not clear what the correct compromise should be, so waiting for @der to decide before acting on this issue.

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

2 participants