Commit Graph

2029 Commits

Author SHA1 Message Date
Mark Paluch
36b05365db Bundle Javadoc with Antora documentation site.
Closes #2930
2024-07-31 09:42:49 +02:00
Gerrit Meier
8fc8c75871 Upgrade Neo4j Java driver to 5.23.0. 2024-07-30 11:19:20 +02:00
Gerrit Meier
bef8acce53 GH-2928 - Handle deeply nested relationships in fluent query correctly.
Closes #2928
2024-07-24 15:36:51 +02:00
Michael Simons
edbda8a1e1 fix: Use contextual Cypher-DSL configuration for rendering statements in various Cypher-DSL based query extension.
Fixes #2927.
2024-07-19 12:40:51 +02:00
Michael Simons
092e18994b fix: Use direction as part of the node collection name for each relationship.
This avoids having duplicate keys in the map projection used to collect the
nodes for each relationship in cases where a node has two relationships with the
same name to the same label in different directions.

Fixes #2918.

Co-authored-by: Mathias Kühn <kuehn@synerva.de>
2024-07-10 09:46:30 +02:00
Michael Simons
223f7cf768 build: Pin CI Neo4j version to 5.20. 2024-07-09 11:17:17 +02:00
Gerrit Meier
be59c43749 Upgrade Neo4j driver to 5.22.0. 2024-06-28 08:05:30 +02:00
Michael Simons
14e6bf36df build(deps): Upgrade CypherDSL to 2023.9.8. 2024-06-25 11:12:14 +02:00
Michael Simons
3ed5c70d50 feat: Allow bidirectional mapping of relationship with properties. (#2914)
This will allow for the mapper to have only *one* physical relationship plus the original behaviour staying intact (creating two independent).

Required mapping is shown in the test.

Basic idea is to check if a relationship in the opposite direction with the actual *same* source and target entities has already been seen. If so, no batch update on the imperative path is scheduled.
Thus however will leave generated ids on the mapping classes unpopulated.
Those will be retrieved after the fact.

---------
Co-authored-by: Gerrit Meier <meistermeier@gmail.com>
2024-06-25 06:49:40 +02:00
Mark Paluch
cd068afebb Switch to Broadcom docker proxy.
Closes #2912
2024-06-20 14:21:40 +02:00
Michael Simons
b7f7bd1294 fix: Take generic field type into account for @RelationshipProperties.
This falls back to checking the field type, so that generic relationship properties can be used instead of a concrete implementation.

Closes #2911.
2024-06-19 12:48:35 +02:00
Gerrit Meier
de7cd06ed7 Upgrade Neo4j Java driver to 5.21.0. 2024-06-05 09:11:15 +02:00
Michael Simons
7d38286218 docs: Add additional tests proving bidi relationships with properties work as intended.
Closes #2905.
2024-05-23 14:54:37 +02:00
Michael Simons
68762fd073 refactor: Stablize test.
Sorting is probably a good idea when testing the result on a specific order.
2024-05-23 14:53:31 +02:00
Michael Simons
0bae3c7cf8 fix: Update relationship properties objects before populating result entities.
Closes #2904
2024-05-22 17:21:34 +02:00
Mark Paluch
a2bb573e77 After release cleanups.
See #2894
2024-05-17 11:51:34 +02:00
Mark Paluch
9834004930 Prepare next development iteration.
See #2894
2024-05-17 11:51:32 +02:00
Mark Paluch
381ad14f86 Release version 7.3 GA (2024.0.0).
See #2894
2024-05-17 11:49:25 +02:00
Mark Paluch
4818f6cfb4 Prepare 7.3 GA (2024.0.0).
See #2894
2024-05-17 11:49:10 +02:00
Michael Simons
6aace2e231 fix: Load properties required to instantiate KClasses backing projections proper.
Closes #2899
2024-05-13 15:38:05 +02:00
Gerrit Meier
672e02eeab Upgrade Neo4j driver to 5.20.0. 2024-05-08 18:09:20 +02:00
Michael Simons
399cba4fae feat: Allow cascading updates to be disabled. (#2897)
This adds a boolean attribute `cascadeUpdates` to `@Relationship`, selectively preventing the cascade of updates. This attribute will be `false` by default.

It does not have an effect when storing new entities.
It does not affect the deletion of relationships.
It does not affect the storing of relationships with or without properties.

Be aware that with a non-cascading update, you can bring your aggregate root in a state in which it is no longer in sync with the actual state of it in the graph.

Thanks to @shanon84 for valuable input.

Closes #2604
2024-05-08 16:46:37 +02:00
Michael Simons
2861e77133 refactor: Move away from deprecated Cypher-DSL constructs. (#2895)
All relevant Cypher integrations is available on `Cypher` for a while now.
To be able to remove them in Cypher-DSL 2024.0.0, we must make sure they are not used here anymore, as Cypher-DSL has a couple of integration tests with SDN6.
Also, leading by example is always nice.
2024-04-19 12:13:58 +02:00
Mark Paluch
c7726d2e7b After release cleanups.
See #2877
2024-04-12 10:52:59 +02:00
Mark Paluch
517bdc345a Prepare next development iteration.
See #2877
2024-04-12 10:52:58 +02:00
Mark Paluch
4981d7209e Release version 7.3 RC1 (2024.0.0).
See #2877
2024-04-12 10:50:41 +02:00
Mark Paluch
dc90d5db7a Prepare 7.3 RC1 (2024.0.0).
See #2877
2024-04-12 10:50:27 +02:00
Mark Paluch
3ec8e504f0 Align OffsetScrolling to zero-based indexes.
OffsetScrollPosition is now 0-based instead of 1-based. We differentiate between ScrollPosition.offset() as initial position and ScrollPosition.offset(0) pointing to the first returned element.

Remove unused variable.

Closes #2890
Original pull request: #2891
2024-04-10 10:46:43 +02:00
Gerrit Meier
8bc66fcd79 GH-2884 - Support composite property in sort.
Should work for map projection and node returns now.

Closes #2884
2024-04-09 17:30:07 +02:00
Gerrit Meier
46aca8188a GH-2889 - Upgrade Neo4j Java driver to 5.19.0
Closes #2889
2024-04-05 13:14:24 +02:00
Gerrit Meier
0e40d9053c GH-2888 - Respect multiple Neo4jTransactionManagers.
There might be different transaction managers in place for different
Neo4jTemplates.

The change is also applied to the ReactiveNeo4jTemplate.

Co-authored-by: Michael Simons <michael@simons.ac>
2024-04-05 11:51:31 +02:00
Gerrit Meier
c02dd5a8c0 GH-2888 - Fix eager PlatformTransactionManager dependency.
Closes #2888
2024-04-04 16:03:46 +02:00
Gerrit Meier
6ea4e78cd9 GH-2879 - Use elementId in derive queries.
There is a convenient function if the property in derived queries
refers to the internal id to use the `id` / `elementId` function.
This was never taken into consideration when the elementId support
got introduced.

The fix is straight forward in line with the existing call to
`Cypher.call("id")` to avoid introducing more changes to the
infrastructure.

Also includes fixture for the logging capture based tests around
elementId/id to catch the right log output again.

Closes #2879
2024-04-02 16:53:34 +02:00
Michael Simons
af1e40c1d6 fix: Look for static labels to contain a label, not vice versa. (#2887)
Fixes #2886.
2024-04-02 14:30:38 +02:00
Michael Simons
28a6e5ce8a refactor: Avoid recreation of imperative nested statemachine in some comes.
Fixes #2882
2024-03-18 14:42:46 +01:00
Michael Simons
6d18d0b6ee refactor: Improve retry predicate by delegating to the driver first. 2024-03-18 14:41:58 +01:00
Francesco Chicchiriccò
2275a77422 fix: Check for Pageable.unpaged when requesting pages. 2024-03-18 10:19:54 +01:00
Mark Paluch
031587230f After release cleanups.
See #2864
2024-03-15 11:09:58 +01:00
Mark Paluch
e000e43a64 Prepare next development iteration.
See #2864
2024-03-15 11:09:57 +01:00
Mark Paluch
69372d3617 Release version 7.3 M2 (2024.0.0).
See #2864
2024-03-15 11:07:31 +01:00
Mark Paluch
3c61af23cf Prepare 7.3 M2 (2024.0.0).
See #2864
2024-03-15 11:07:09 +01:00
Gerrit Meier
99e9b55394 GH-2873 - Upgrade Neo4j Driver to 5.18
Closes #2873
2024-03-13 14:22:17 +01:00
Mark Paluch
caddcb6362 Skip entity detection for converted properties.
DefaultNeo4jPersistentProperty.isEntity() and getPersistentEntityTypeInformation() now return that the property does not map to an entity if a converter is registered.

Closes #2869
2024-03-11 11:49:46 +01:00
Michael Simons
79aacaa181 fix: Several issues wrt JavaDoc and the module-path. (#2865)
The latest version of the Maven JavaDoc plugin and JavaDoc itself have been rightfully complaining that some pieces of SDN have been using internal API of the driver and Cypher-DSL which would not be available on the module-path.

This has been fixed. The schema-name support from Cypher-DSL is now a direct dependency and not relying on the shaded version any long.

Several issues in the `Neo4jSpelSupport` have been fixed along the way.
2024-02-21 13:15:17 +01:00
Christoph Strobl
f45ec1124a After release cleanups.
See #2825
2024-02-16 14:41:25 +01:00
Christoph Strobl
b2c85d8a04 Prepare next development iteration.
See #2825
2024-02-16 14:41:23 +01:00
Christoph Strobl
7e952a5a68 Release version 7.3 M1 (2024.0.0).
See #2825
2024-02-16 14:37:38 +01:00
Christoph Strobl
4227b99ff1 Prepare 7.3 M1 (2024.0.0).
See #2825
2024-02-16 14:37:00 +01:00
Gerrit Meier
93cdb5a97b GH-2861 - Upgrade Neo4j Java driver to 5.17.
Closes #2861
2024-02-13 09:12:19 +01:00
Gerrit Meier
e8d506c8c3 GH-2860 - Add explicit transaction boundaries.
If no transactional boundaries were set by the user,
Spring Data Neo4j would create new transactions (default read/write)
for the underlying database operations.

In cases where multiple statements are required to execute
a SDN operation this would mean that multiple transaction
would have been created.

This commit fixes this problem and creates new transaction if no
transaction was defined around the invocation of those units-of-work.

The change will introduce a breaking change:
All pure read operations in SDN (like Neo4jTemplate#findAll) will
now happen in read-only transactions.
If they contain custom statements with write operations,
they need to get wrapped in an explicit write transaction.

Closes #2860

Co-authored-by: Michael Simons <michael@simons.ac>
2024-02-12 11:49:16 +01:00