spring-data-neo4j-4

Paging and sorting in Spring Data Neo4j 4

纵然是瞬间 提交于 2019-11-29 09:54:29
is there pagination support for custom queries in SDN4? If yes, how does it work? If no, is there a workarround? I have the following Spring Data Neo4j 4 repository: @Repository public interface TopicRepository extends GraphRepository<Topic>,IAuthorityLookup { // other methods omitted @Query("MATCH (t:Topic)-[:HAS_OFFICER]->(u:User) " + "WHERE t.id = {0} " + "RETURN u") public Page<User> topicOfficers(Long topicId, Pageable pageable); } And the corresponding testcase: @Test public void itShouldReturnAllOfficersAsAPage() { Pageable pageable = new PageRequest(1,10); Page<User> officers =

Neo4j TimeTree in Spring Data Neo4j 4.0

旧街凉风 提交于 2019-11-28 06:29:26
问题 I'm trying to utilize the timetree library in my spring data neo4j 4.0.0 project. As elaborated in this page, https://github.com/graphaware/neo4j-timetree, I've edited my neo4j.properties file to enable the auto event attaching, add timetree dependency to my gradle, and set a property 'creationDate' in the event node with Long data type. Albeit everything looks as it should be, it still doesn't create any timetree. Hereby is my neo4j.property file: # Runtime must be enabled like this com

Paging and sorting in Spring Data Neo4j 4

余生颓废 提交于 2019-11-28 03:12:38
问题 is there pagination support for custom queries in SDN4? If yes, how does it work? If no, is there a workarround? I have the following Spring Data Neo4j 4 repository: @Repository public interface TopicRepository extends GraphRepository<Topic>,IAuthorityLookup { // other methods omitted @Query("MATCH (t:Topic)-[:HAS_OFFICER]->(u:User) " + "WHERE t.id = {0} " + "RETURN u") public Page<User> topicOfficers(Long topicId, Pageable pageable); } And the corresponding testcase: @Test public void

How do I query for paths in spring data neo4j 4?

旧巷老猫 提交于 2019-11-27 07:12:30
问题 In an earlier version of spring data neo4j (3.3.1), I was able to query for paths in my database and return them as Iterable<EntityPath<S,E>> like this: public interface ArgumentNodeRepository extends GraphRepository<ArgumentNode> { @Query("START t=node({0}), r=node({1}) MATCH p=t<-[:SUPPORTED_BY|INTERPRETS*0..]-r RETURN p") Iterable<EntityPath<ArgumentNode, ArgumentNode>> getPaths(long childId, long rootId); } I'm trying to migrate to 4.0.0 and the EntityPath class seems to have disappeared.