# Cannot pull data from relationship with SDN 6

**URL:** <https://community.neo4j.com/t/cannot-pull-data-from-relationship-with-sdn-6/64447>\
**Category:** Spring Data Neo4j & Neo4j-OGM\
**Tags:** ogm\
**Created:** [October 11, 2023, 6:36pm UTC](https://community.neo4j.com/t/cannot-pull-data-from-relationship-with-sdn-6/64447 "2023-10-11T18:36:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![esteves.gean](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/esteves.gean/32/29791_2.png) [@esteves.gean](https://community.neo4j.com/u/esteves.gean)\
**Post date:** [October 11, 2023, 6:36pm UTC](https://community.neo4j.com/t/cannot-pull-data-from-relationship-with-sdn-6/64447/1 "2023-10-11T18:36:38Z")

</div>

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:

```auto
public class NodeEntity {
...

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

```

Then, this is my Server class:

```auto
@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:

```auto
@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,

---

<div class="post-metadata">

**Author:** ![gerrit.meier](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/gerrit.meier/32/27374_2.png) [@gerrit.meier](https://community.neo4j.com/u/gerrit.meier)\
**Post date:** [October 12, 2023, 6:22am UTC](https://community.neo4j.com/t/cannot-pull-data-from-relationship-with-sdn-6/64447/2 "2023-10-12T06:22:48Z")

</div>

This should work as expected.

I created a (non-)reproducer at [https://github.com/meistermeier/neo4j-issues-examples/tree/master/discourse-64447](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.
