Improve interoperability with Spring Data Rest and other projects. #2489
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.
This improves the interoperability with Spring Data Rest by a magnitude by treating
@TargetNode
as association to the outside world. Why? Because no resource processing needs to be done on@RelationshipProperties
to have embedded links for their target node.Two support classes for both associations and properties have been added as internal API to chim our philosophy from that change.
To demonstrate that change have a look here: https://github.com/michael-simons/neo4j-examples-and-tips/blob/832e0334a09692bdd72474c9ba11390bc68a493b/examples/sdn6-rest/src/main/java/org/neo4j/tips/sdn/sdn6_rest/SpringDataRestConfig.java#L29-L40
This piece is necessary to include the actual
Person
behind theActor
as an embedded resource. Otherwise, SDR won't recognise it as association, even though it is managed by a repository.With this change in place, we also can use proper excerpts as recommended by @odrotbohm, for example see here_
michael-simons/neo4j-examples-and-tips@9a74697
A full blown result that shows