Open utterances-bot opened 2 years ago
Having built a Specification according to these instructions, you use it by giving it to your repository like this:
myRepository.findAll(specificationIJustBuilt);
@kendricbeachey thanks for the feedback. I updated my blog post to clarify how to use the specifications.
Nice one!
Nice article. I think it would be better if you put the code in GitHub.
Thanks
Writing dynamic queries with Spring Data JPA | Dimitri's tutorials
With Spring Data, we can easily write queries usinng @Query. For more dynamic queries, we can use the Example and Specification API, which we'll explore here.
https://dimitr.im/writing-dynamic-queries-with-spring-data-jpa