0
@Query("MATCH (parentD:Decision)-[:CONTAINS]->(childD:Decision)-[ru:CREATED_BY]->(u:User) WHERE id(parentD) = {parentDecisionId} RETURN childD, ru, u ORDER BY childD.createDate DESC")
List<Decision> getChildDecisions(@Param("parentDecisionId") Long parentDecisionId);

Is it possible to pass order expression like childD.createDate and order direction like ASC or DESC via Spring Data Neo4j 4 repository method parameters ? If so, could you please show an example.

Or do I need to use Pageable in this case ?

alexanoid
  • 24,051
  • 54
  • 210
  • 410
  • 3
    Referring to your first question I found this post (look at the answer): https://stackoverflow.com/questions/39392784/spring-data-neo4j-order-by-order-fails - This would mean that it is not possible to use your order direction as a method parameter. – K.E. Jan 08 '17 at 19:10
  • Possible duplicate of [Spring Data Neo4j - ORDER BY {order} fails](http://stackoverflow.com/questions/39392784/spring-data-neo4j-order-by-order-fails) – Luanne Feb 03 '17 at 17:05

0 Answers0