Fredrik,
what would be the issue to use template.getRelationships() ?
Or mix in the RelationshipOperationsRepository which has methods like:
<R> R createRelationshipBetween(T start, Object end, Class<R> relationshipEntityClass, String relationshipType);
<R> R createDuplicateRelationshipBetween(T start, Object end, Class<R> relationshipEntityClass, String relationshipType);
<R> R getRelationshipBetween(T start, Object end, Class<R> relationshipEntityClass, String relationshipType);
void deleteRelationshipBetween(T start, Object end, String type);
In general you wouldn't want to do that except for exceptions. As cypher queries are cached pre-parsed so you don't get the parsing penalty on each query. So parameters help to make queries look alike so that the cached value
will be reused.
There is a CypherDSLRepository that you can mix in to your Repository to use.