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

Support transactional mode that does not require generated subclasses and calculates changes on commit #231

Closed
ledsoft opened this issue Feb 26, 2024 · 0 comments · Fixed by #232
Milestone

Comments

@ledsoft
Copy link
Contributor

ledsoft commented Feb 26, 2024

Currently, JOPA tracks changes during transaction and propagates them to a transactional snapshot in the OntoDriver. This requires a way to be notified of changes to managed entities. This was done by AspectJ aspects prior to 2.0.0-SNAPSHOT, and currently is done via ByteButty-generated subclasses of entities.
However, this causes issues for applications that rely on entities being direct instances of the entity classes (e.g., when the entity classes are used as Map keys).
Since, for example, RDF4J driver does not use the transactional changes to enhance any repository access anyway, it makes sense to introduce a mode where transactional changes would be calculated on commit and immediately propagated to the underlying repository, without the in-transaction intermediate. This is how JPA implementations work.
On the other hand, we want to retain support for tracking changes during transaction, e.g., for reasoner usage in the OWLAPI/Jena driver. Therefore, JOPA should support two modes of operation - the current transaction changes tracking mode using ByteButty subclasses, and a new JPA-like mode where changes are calculated on commit and entity classes are used directly, without generated subclasses.

@ledsoft ledsoft added this to the 2.0.0 milestone Feb 26, 2024
ledsoft added a commit that referenced this issue Mar 5, 2024
…es directly to repository instead of gathering them in local model.
ledsoft added a commit that referenced this issue Mar 5, 2024
ledsoft added a commit that referenced this issue Mar 5, 2024
…OfWork and ChangeTrackingUnitOfWork.

Another extension of AbstractUnitOfWork will be added that will calculate and propagate changes to the repository on commit.
ledsoft added a commit that referenced this issue Mar 14, 2024
…changes on commit and propagates them to the storage.
ledsoft added a commit that referenced this issue Mar 20, 2024
…ctionProxy to contain common functionality.
ledsoft added a commit that referenced this issue Mar 25, 2024
…Proxy implementation for lazily loaded collection attributes.
ledsoft added a commit that referenced this issue Mar 25, 2024
ledsoft added a commit that referenced this issue Apr 4, 2024
… to support non-empty collection attributes.
ledsoft added a commit that referenced this issue Apr 4, 2024
ledsoft added a commit that referenced this issue Apr 4, 2024
@ledsoft ledsoft linked a pull request May 23, 2024 that will close this issue
@ledsoft ledsoft closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant