Let named native query produce Page<Entity> as a return of query method. [DATAJPA-892]
@odrotbohm is already working on this.
Since Dec 30, 2020.
Assessment
This issue has not been assessed yet.
Description
Pramoth Suwanpech opened DATAJPA-892 and commented
I would be nice if we can do paging with native query.
If developer prepare findQuery (spring data predefined parameter {startRow:endRow}) and countQuery then it is possible to build Page?
public Page<MyEntity> findAllMyEntity(Pageable);
in native query I prepare named query as 'MyEntity.findAllMyEntity' and 'MyEntity.findAllMyEntity.count'
like this
MyEntity.findAllMyEntity
select z,b,c from MY_ENTITY LIMIT ?1,?2 -- so ?1 is startRow and ?2 is endRow
MyEntity.findAllMyEntity.count
select count(z) from MY_ENTITY LIMIT
What do you think?
No further details from DATAJPA-892
- Dominant language
- Java
- Stars
- 3.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-projects/spring-data-jpa
-
type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-data-jpa#2648 · 3 comments ·
-
status: waiting-for-triage
Difficulty 3/5 1-2 days Newbie friendliness 76/100
spring-projects/spring-data-jpa#4359 ·
-
status: waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 55/100
spring-projects/spring-data-jpa#4341 ·
-
status: waiting-for-triage
Difficulty 3/5 1-2 days Newbie friendliness 68/100
spring-projects/spring-data-jpa#4338 ·
-
status: waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spring-projects/spring-data-jpa#4332 ·
All issues in spring-projects/spring-data-jpa
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·