【问题标题】:Paging And Sorting queries in Spring Data CassandraSpring Data Cassandra 中的分页和排序查询
【发布时间】:2015-01-14 01:19:48
【问题描述】:

根据 Spring-data-cassandra 文档, http://docs.spring.io/spring-data/cassandra/docs/1.1.1.RELEASE/reference/html/#requirements

支持分页和排序查询,但是,当我使用接口 PagingAndSortingRepository 时,分页查询会引发以下异常:

下面是我的接口定义:

@EnableCassandraRepositories
public interface PersonRepository extends PagingAndSortingRepository<User, String>

。 . .

下面是堆栈跟踪:

Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: neither slice nor page queries are supported yet
 at org.springframework.data.cassandra.repository.query.CassandraQueryMethod.verify(CassandraQueryMethod.java:80)
 at org.springframework.data.cassandra.repository.query.CassandraQueryMethod.<init>(CassandraQueryMethod.java:68)
 at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactory$CassandraQueryLookupStrategy.resolveQuery(CassandraRepositoryFactory.java:106)
 at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:357)
 at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:192)
 at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:239)
 at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:225)
 at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean.afterPropertiesSet(CassandraRepositoryFactoryBean.java:62)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
 ... 11 more

请帮忙!!!

【问题讨论】:

    标签: spring-data spring-data-cassandra


    【解决方案1】:

    这是一个文档复制/粘贴错误。请输入错误文档的 JIRA 问题。在https://jira.spring.io/browse/DATACASS-56

    上跟踪是否支持分页和排序已经存在问题

    【讨论】:

    • 似乎没有为 Cassandra 实现。
    • 嗯,我基本上就是这么说的。
    猜你喜欢
    • 2020-03-06
    • 2019-02-22
    • 2015-08-17
    • 2019-07-14
    • 1970-01-01
    • 2017-05-13
    • 2015-02-08
    • 2019-04-18
    • 2012-12-16
    相关资源
    最近更新 更多