Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

强制路由到单表或单库不能翻页 #416

Closed
wangshuguan opened this issue Oct 19, 2017 · 1 comment
Closed

强制路由到单表或单库不能翻页 #416

wangshuguan opened this issue Oct 19, 2017 · 1 comment

Comments

@wangshuguan
Copy link

Please answer these questions before submitting your issue. Thanks!

Which version of Sharding-Jdbc do you using?

1.5.1

Expected behavior

可以正常翻页,这里使用jpa分页

Actual behavior

除了第一页,其它页都为空

Steps to reproduce the behavior

强制路由到一张分片表,基本的jpa分页操作,如果读取非第一页数据,查询内容为空

Please provide the reproduce example codes (such as github link) if possible.

如下,page
HintManager hintManager = HintManager.getInstance();
hintManager.addDatabaseShardingValue("customer", "cust_nbr", "10000104");
hintManager.addTableShardingValue("customer", "cust_nbr", "10000104");
Pageable pageable = new PageRequest(3, 20, new Sort("custNbr"));
Page custs = customerRepository.findAll(getWhereClause("D"),pageable);
List pageContent = custs.getContent();

@terrymanu
Copy link
Member

diplicate with #375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants