Commit Graph

692 Commits

Author SHA1 Message Date
Mark Paluch
ef83cdb1ff Prepare 6.3.8 (2021.2.8).
See #2654
2023-02-17 10:08:08 +01:00
Michael Simons
5d1241e591 GH-2621: Recursively apply DtoInstantiating converter for fluent ops. (#2667)
This allows to use Dto based projections to be used in a nested fashion when using the fluent save operations.

This does not solve - or attempt to solve - the issue that we don’t have any information what concrete projection class to be used when projection in all cases.

In the test `nestedProjectWithFluentOpsShouldWork` we could argue that the concrete value can be used to determine the type information. However, while that can be made to work with heterogeneous collections, it would bring a big performance penalty, getting new persistent entity instances and property accessors all the time.

Thus, this change now makes sure no exception is thrown when using such inherited projections, but does explicitly not bring support for deriving the projected properties from them accross an inheritance hierachy.

For more information, please read the comments in org.springframework.data.neo4j.integration.imperative.ProjectionIT#nestedProjectWithFluentOpsShouldWork and org.springframework.data.neo4j.integration.imperative.ProjectionIT#nestedProjectWithFluentOpsShouldWork2.

This closes #2621.
2023-02-10 08:58:46 +01:00
Gerrit Meier
ec5cb854bd GH-2668 - Optimise update of relationship properties.
There is no need to fetch start and end node if we already have the
identifier of the relationship to update.

Closes #2668
2023-02-09 16:57:43 +01:00
Gerrit Meier
cb03fcadd8 GH-2661 - Detect entity in projection correctly.
There was a random picking of correct property paths
if they represented the very same length (1).
Added a `isEntity` filter to be sure that only the interesting
property paths get returned.

Closes #2661
2023-01-24 11:16:29 +01:00
Gerrit Meier
71e3fd743f GH-2622 - Throw exception on immutable self-reference.
This slipped through the check before:
A has dependency on A defined within the constructor.
Because of a "same" entity check, we skipped the `inCreation` check
and did not throw the MappingException.

Closes #2622
2023-01-23 16:17:26 +01:00
Gerrit Meier
bcba1e577f GH-2656 - Fix broken link in reference documentation.
Linked repository got renamed.

Closes #2656
2023-01-20 12:42:09 +01:00
Gerrit Meier
bc2efd8f98 GH-2655 - Fix false-positive cycle detection.
If multiple base class extending entities contain the very same target,
it was reported as a cycle.
Now it will get correctly detected as a directed graph.

Closes #2655
2023-01-20 11:47:41 +01:00
Gerrit Meier
302b5385bd GH-2655 - Find child relationships reliable.
Don't exclude relationships only by their field name but also by their target entity.
2023-01-18 11:28:17 +01:00
Mark Paluch
c4f8b6c280 Prepare 6.3.7 (2021.2.7).
See #2629
2023-01-13 10:32:30 +01:00
Michael Simons
74e6bfbcfc GH-2640 - Introduce API for dynamic configuration of transient properties. (#2645)
This change introduces the concept of `PersistentPropertyCharacteristics` and `PersistentPropertyCharacteristicsProvider`.
The latter can be registered implicitly as a `@Bean` with the mapping context or via a custom mapping context. It allows
checking the properties and their owner for indicators like type and so on to treat them as transient or read only.
Examples have been added to the `Neo4jMappingContextTest` and `PersistentPropertyCharacteristicsIT`.

This closes #2640.
2023-01-05 10:56:02 +01:00
Mark Paluch
6ddbba86f0 Extend license header copyright years to 2023.
See #2642
2023-01-02 09:51:57 +01:00
Gerrit Meier
8ab3e413de GH-2639 - Fix relationship detection in converter.
In an inheritance situation, SDN might not search in the result
for the right name of the list of relationships from the generic query.

Closes #2639
2022-12-15 12:26:24 +01:00
Michael Simons
c7f0c5e769 GH-2638 - Use labels(n) when deriving a contains query for an entity with dynamic labels.
Closes #2638.
2022-12-14 15:25:11 +01:00
Michael Simons
ea8f2d5dec GH-2632 - Upgrade Java driver to 4.4.10.
Closes #2632 for 6.3 with the fixed driver 4.4.10.
2022-12-08 15:20:22 +01:00
Michael Simons
efe7dc344a GH-2633 - Be more lenient when mapping DTOs. (#2634)
We can support many more usecases of "I want to have a lightweight mapping tool" for DTOs by just
restricting the cases in which a `NoRootNodeMappingException` is thrown.

The idea is as follows: If the `DefaultNeo4jEntityConverter` does not deal with a synthesized
record comming from `AggregatingMappingFunction` it uses the the root map as base for mapping
if the root record is already a map value. If that is not the case and the root record does
not contain any paths that maybe aggregated later one, we synthesize a map one single time
and evaluate that for being mappable.

Closes #2633.
2022-11-24 16:34:29 +01:00
Mark Paluch
5e0f1815f7 Prepare 6.3.6 (2021.2.6).
See #2609
2022-11-18 10:44:44 +01:00
Michael Simons
889253dfa9 GH-2618 - Allow the use of composite values as ids.
Also allow the use of composite values in derived findBy… methods.

Closes #2618.
2022-10-28 13:56:20 +02:00
Michael Simons
985da3af1f GH-2619 - Correctly count most matching, static labels.
In case another matching node description is found, the value of the `mostMatchingStaticLabels` must be updated.

Fixes #2619.
2022-10-27 13:21:46 +02:00
Gerrit Meier
69395adba8 Add section about projection modification after loading. 2022-10-14 11:05:39 +02:00
Gerrit Meier
4b417631d3 Add note about version field for provided ids. 2022-10-14 10:45:03 +02:00
Spring Builds
fd2182a91b Prepare 6.3.5 (2021.2.5).
See #2608
2022-10-13 13:21:26 +00:00
Spring Builds
e2d12492d1 Prepare 6.3.4 (2021.2.4).
See #2595
2022-10-13 08:56:57 +00:00
Gerrit Meier
44a5c9af44 GH-2585 - Make type detection by label more robust.
Closes #2585
2022-10-12 09:41:01 +02:00
Gerrit Meier
9d6acf955d GH-2600 - Fix relproperties and simple relationship hydration.
Misses dynamic relationships right now.

Closes #2600
2022-10-11 14:55:11 +02:00
Gerrit Meier
590f748fe1 GH-2599 - Fix bug on save with updated and new relationship properties.
Closes #2599
2022-09-26 12:03:57 +02:00
Spring Builds
511ca4c1d0 Prepare 6.3.3 (2021.2.3).
See #2569
2022-09-19 11:36:13 +00:00
Michael Simons
b645d3fb38 GH-2594 - Add withNeo4jConversions to both Neo4jClient and
`ReactiveNeo4jClient`.

Closes #2594.
2022-09-19 12:09:58 +02:00
Gerrit Meier
b10ea7fabe GH-2591 - Fix StackOverflow on first level of recursive projections.
Closes #2591
2022-09-14 19:17:10 +02:00
Gerrit Meier
1af73557e5 GH-2588 - Replace node creation's MERGE with UNION.
Ensure that no duplicates can get created.

Closes #2588
2022-09-14 15:30:53 +02:00
Gerrit Meier
82c92b3752 GH-2593 - Move relationship updates to batch operations.
This change explicitly excludes:
- All reactive operations
- Dynamic relationships

Closes #2593
2022-09-14 13:32:51 +02:00
Gerrit Meier
0f51a3a95b Update explicit docker images to 4.4. 2022-08-25 10:01:41 +02:00
Gerrit Meier
d898bc4b2e GH-2583 - Avoid possible deadlock. 2022-08-25 10:01:19 +02:00
Gerrit Meier
256152431a GH-2583 - Improve relationship mapping.
Accept maximum of two iterations for a relationship before it gets removed from the candidate list.

Closes #2583
2022-08-24 17:48:28 +02:00
Michael Simons
79902fa6d4 GH-2581 - Add examples for nested projections.
Closes #2581.
2022-08-09 12:26:14 +02:00
Michael Simons
f35026c4a2 GH-2580 - Add examples for transactional event listeners.
Closes #2580.
2022-08-08 12:14:01 +02:00
Michael Simons
c92fbe4888 GH-2578 - Document unwinding and pipelining of mapped __properties__.
Closes #2579.
2022-08-05 11:43:17 +02:00
Michael Simons
e77c6e1ce7 Add converter from java.util.Map to org.neo4j.driver.Value.
Closes #2576.
2022-08-04 13:38:18 +02:00
Michael Simons
57053ba8db Compare dot paths for equality, not containg.
Fixes #2578 in which the mere presence of a fragment triggered inclusion of an otherwise excluded property.
2022-08-03 16:03:58 +02:00
Niklas Krieger
5ee98605ff GH-2575 - Provide ReactiveCypherdslConditionExecutor. (#2577)
Closes #2575 (Original PR was #2577).
2022-08-03 10:48:27 +02:00
Michael Simons
9ef26c35c6 GH-2574 - Ensure consistent behaviour of org.springframework.data.neo4j.core.mapping.NodeDescription#getChildNodeDescriptionsInHierarchy.
This fixes #2574.
2022-08-01 12:16:14 +02:00
Michael Simons
4463ccc865 GH-2572 - Filter out records that could not be mapped to allow Cypher OPTIONAL returns.
This fixes #2572 and is a tough call: The query presented there is totally valid but returns not an empty result but a record containing only one `null` element due to the way the Cyper `OPTIONAL` keyword works. We could try parsing the query, but this will be an endless rabbit whole in the future to come.

The approach here is to check now whether a result contains exactly one record with one `NULL` value. If that is the case, no exception is thrown but  `null` returned, which is later filtered on the clients.

That however drops the checking for non-null values there, so that methods don’t throw in those cases but returns empty optionals or empty / smaller lists.
2022-07-25 15:25:55 +02:00
Gerrit Meier
ee60a1faf6 Adapt to Cypher changes (group key). 2022-07-19 22:23:02 +02:00
Christoph Strobl
e203369750 Prepare 6.3.2 (2021.2.2).
See #2556
2022-07-15 11:07:49 +02:00
Gerrit Meier
2efd858c8a GH-2565 - Skip null properties on mapping/reading.
Allows to use default values in the entity classes.
Closes #2565
2022-07-14 10:31:11 +02:00
Michael Simons
f16f0058f5 GH-2564 - Add example how to combine auditing with custom callbacks.
Closes #2564
2022-07-12 11:23:34 +02:00
Michael Simons
03be6a377b GH-2562 - Restructure documentation.
Especially pull up the parts explaining the differences between SDN6 and SDN+OGM, make the FAQ more visible and have only one appendix in one place.

Closes #2562.
2022-07-01 16:42:58 +02:00
Michael Simons
70678af615 GH-2557 - Improve documentation for read-only transactions.
Closes #2557.
2022-06-22 15:32:04 +02:00
Michael Simons
c95a3e97ae GH-2537 - Improve documentation.
# Conflicts:
#	src/test/java/org/springframework/data/neo4j/integration/issues/IssuesIT.java
#	src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/PersonRepository.java
#	src/test/java/org/springframework/data/neo4j/integration/issues/gh2323/PersonService.java
2022-06-20 14:05:16 +02:00
Mark Paluch
d446f7289c Prepare 6.3.1 (2021.2.1).
See #2539
2022-06-20 11:29:04 +02:00
Gerrit Meier
4d965135eb GH-2550 - Accept list and plain values in result.
Closes #2550
2022-06-17 12:46:39 +02:00