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

Feature/306 em trigger lazy loading #307

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

luxbe
Copy link
Contributor

@luxbe luxbe commented Jan 10, 2025

This PR fixes #306 by triggering lazy loading when EntityManagerImpl is presented with a LazyLoadingProxy in the contains and remove methods.

@luxbe
Copy link
Contributor Author

luxbe commented Jan 10, 2025

The build fails because the following test DeleteOperationsRunner.removeTriggersLazyLoading fails only with the DeleteOperationsTest of the OWLApi implementation.

Executing the following statement:

((EntityManagerImpl) em).createNativeQuery("SELECT ?p WHERE {?s ?p ?o}", String.class).setParameter("s", entityA.getUri()).getResultList()

before and after the remove call within the removeTriggersLazyLoading test reveals, that before the remove call, there are 4 statments left from entityA:

0 = "http://www.w3.org/2002/07/owl#topDataProperty"
1 = "https://onto.fel.cvut.cz/ontologies/jopa/attributes#A-stringAttribute"
2 = "http://www.w3.org/2002/07/owl#topObjectProperty"
3 = "http://www.w3.org/2002/07/owl#topObjectProperty"

while after the remove call, there are still 2 statements left:

0 = "http://www.w3.org/2002/07/owl#topObjectProperty"
1 = "http://www.w3.org/2002/07/owl#topObjectProperty"

In the RDF4J and the Jena implementation, all statements are properly removed. Therefore, I believe that this is a bug in the OWL implementation.

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