# Spring data neo4j will not return a path

**URL:** <https://community.neo4j.com/t/spring-data-neo4j-will-not-return-a-path/11567>\
**Category:** Spring Data Neo4j & Neo4j-OGM\
**Tags:** cypher, paths, shortest-path, path\
**Created:** [November 3, 2019, 7:38pm UTC](https://community.neo4j.com/t/spring-data-neo4j-will-not-return-a-path/11567 "2019-11-03T19:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![merritts](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/merritts/32/7235_2.png) [@merritts](https://community.neo4j.com/u/merritts)\
**Post date:** [November 3, 2019, 7:38pm UTC](https://community.neo4j.com/t/spring-data-neo4j-will-not-return-a-path/11567/1 "2019-11-03T19:38:09Z")

</div>

I am struggling to get spring to return the path result for the query below. I cannot find any documentation detailing how spring data neo4j handles returning paths. Any advice would be much appreciated.

```auto
public interface OccupationRepository extends Neo4jRepository<Occupation, Long> {
	
	@Query("MATCH (ms:Occupation {title: {start}}), (cs:Occupation {title: {finish}}), p = shortestPath((ms)-[:LEADS_TO*]-(cs)) RETURN p")
	Iterable<Map<String, Object>> findCareerPath(@Param("start") String start, @Param("finish") String finish);

}

```
