I am currently using spring derived queries in my application. Eg:
Dog findById(String id);
Is there a way to add 2 or more clauses to the derived queries? eg:
Dog findByIdAndOwnerOrderByOwner();
You should be able to do something like this,
Dog findByIdAndOwnerOrderByOwnerDesc(String id, String owner);
As long as you use AND or OR to concatenate your query, it should handle multiple clauses. I also believe you need to specify the order by order (ASC/DESC).
Check out Spring Data JPA for more information regarding this topic.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.