Feat: Migrate persistence layer to Neo4j Bolt driver #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
This pull request constitutes a major architectural refactoring of the datanucleus-neo4j plugin. It replaces the legacy, embedded-only persistence implementation with a modern, robust backend powered by the official Neo4j Bolt Driver.
This migration addresses critical bugs in core persistence operations (especially updates and relationship management) and provides a more stable, performant, and maintainable foundation for the future.
Summary of Changes
The changes can be categorized into three main efforts: a full backend replacement, a strategic refactoring of existing code, and targeted bug fixes.
The core of this PR is a completely new set of classes designed to work with the neo4j-java-driver.
To support the new backend and improve maintainability, existing code was heavily refactored:
Test Suite and Plugin Configuration
The plugin.xml has been simplified to register only the single, intelligent ConnectionFactoryImpl.
The tests you provided (and fixed) in the initial problem description are now fully supported and serve as validation for the new backend's correctness for create, read, update, delete, and relationship management operations.
Impact
This is a foundational PR that brings the datanucleus-neo4j plugin into the modern era. It resolves long-standing stability issues, improves performance by using the official binary protocol, and provides a clear, maintainable architecture for future enhancements.
There is lot more to do it for example JDOQL and JPQL support which are clear, currently only supports Cypher queries. And things that are not clear for example: Persistence by reachability does it work in all settings? For this purpose i ask for your feedback and guidance to complete datanucleus-neo4j module.
I am happy to discuss any of the architectural decisions or implementation details. Thank you for your review.