-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
How to limit the return results in a non-declarative query? #3124
Comments
Have you seen the List<User> results = repo.findBy(predicate, query -> query.limit(10).all()); Generally, |
Yes, you are correct.
|
|
I want to be the same “
Collection findByLastname(String lastname, Class type);
”
,But it failed.
public interface PersonDao extends JpaRepository<Person,Long>, JpaSpecificationExecutor
,QuerydslPredicateExecutor {
}
Using Querydsl to construct conditions is very convenient, but it does not allow limiting the return results - I don't want to use it “new JPAQueryFactory(em).select(QPerson.person.name).where(....,
The text was updated successfully, but these errors were encountered: