spring-data
spring-data copied to clipboard
[DE-804] Feature: support edge any direction in derived queries
@Document
public class User {
@Id
private String id;
private String name;
}
@Edge
public class Friend {
@Id
private String id;
@From
private User user1;
@To
private User user2;
}
Supposing I have only user ID, how to write derived query to retrieve the list of friends?
User ID can be used for both user1
or user2
.
This is currently not supported. To work around it you can write a custom AQL query performing a traversal of depth 1 in any direction and use it from @Query
annotation.
Ref: https://www.arangodb.com/docs/stable/aql/graphs-traversals.html https://www.arangodb.com/docs/stable/drivers/spring-data-reference-repositories-queries.html#aql-query-options