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

建议分页封装一下 #13

Closed
zenghuabin opened this issue Jan 22, 2019 · 3 comments
Closed

建议分页封装一下 #13

zenghuabin opened this issue Jan 22, 2019 · 3 comments

Comments

@zenghuabin
Copy link

建议使用原生sql,分页一般要很多条件,使用JPA的很麻烦,建议进行封装一下

@zenghuabin
Copy link
Author

原生sql查询建议也一起封装一个,使用@query 对条件比较多的那种不好用

@elunez
Copy link
Owner

elunez commented Jan 22, 2019

使用原生的sql,就失去了使用jpa的意义了,多条件分页与多表查询目前系统都是用Specification实现的,自行扩展即可,可学习下:Jpa的Specification查询

@elunez elunez closed this as completed Jan 22, 2019
@zenghuabin
Copy link
Author

Jpa的Specification 用这玩意对那种复杂的查询,真的是很难受的,在sql里写好的sql,也没法直接copy过去,简单查询用jpa,复杂的用原生的,建议建议

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

No branches or pull requests

2 participants