Tag: spring data neo4j 4

在Spring Data Neo4j 4中进行分页和排序

在SDN4中是否有对自定义查询的分页支持? 如果是,它是如何工作的? 如果不是,那还有工作吗? 我有以下Spring Data Neo4j 4存储库: @Repository public interface TopicRepository extends GraphRepository,IAuthorityLookup { // other methods omitted @Query(“MATCH (t:Topic)-[:HAS_OFFICER]->(u:User) ” + “WHERE t.id = {0} ” + “RETURN u”) public Page topicOfficers(Long topicId, Pageable pageable); } 和相应的测试用例: @Test public void itShouldReturnAllOfficersAsAPage() { Pageable pageable = new PageRequest(1,10); Page officers = topicRepository.topicOfficers(1L, pageable); assertNotNull(officers); } […]