You can use a Collection
e.g. something like Map<String, List<NodeObj>>
for the dynamic relationship to define multiple nodes for the same dynamic relationship type.
A collect(r), collect(e)
instead of the scalar return values should do the job, but I have lately also seen an issue around this that might prevent the correct mapping. If there is still a problem, could you raise a ticket for this? Log in - Spring JIRA
I created a ticket to track the implementation of this functionality Support RelationshipProperties in dynamic relationships [DATAGRAPH-1385] ยท Issue #1947 ยท spring-projects/spring-data-neo4j ยท GitHub
Side note: we will update the documentation on relationship with properties in the near future to reflect the current state. For a glance I answered another question how @RelationshipProperties
should get defined now Migration to RX - #2 by gerrit.meier