Cannot pull data from relationship with SDN 6

Hi SDN team, we are trying to migrate from SDN 5 to 6 and we are facing an important issue related to SDN not being able to pull data from a specific relationship.

I have the following NodeEntity class:

public class NodeEntity {
...

@Relationship(type = "Serves", direction=Direction.OUTGOING)
private Set<Serves> outbound;
}

Then, this is my Server class:

@RelationshipProperties
@Data
public class Serves {
 
  @Id
  @GeneratedValue
  private Long id;
 
  @JsonProperty(value = "rank")
  private Integer rank;
 
  private NodeEntity startNode;
 
  @TargetNode
  private NodeEntity endNode; 
}

And finally, I'm using this query:

@Query("MATCH (root:RootNode)-->(ln:Node)-[r*]->(rn:Node) WHERE root.rootNodeName = {rootNodeName} and ln.nodeId = {nodeId}"
    + "and (CASE WHEN {depth} IS NULL THEN length(r) > 0 ELSE length(r) <= {depth} END)"
    + "return ln,r,rn")

Before using SDN 6 (SDN 5 and ogm), this such query would return all the outbound nodes, but now I cannot see any data. Even adding COLLECT to the return statement would only allow one single relationship from outbound. Could you help us with this important issue?

Thanks in advance for your time,

This should work as expected.

I created a (non-)reproducer at https://github.com/meistermeier/neo4j-issues-examples/tree/master/discourse-64447
Maybe you can spot the logical difference between your code and mine.

Please note that the NodeEntity startNode is not required anymore. It will get ignored.