g00glen00b / dimitri.codes

Static generator for dimitri.codes using Gatsby
https://dimitri.codes
Other
20 stars 8 forks source link

https://dimitri.codes/writing-dynamic-queries-with-spring-data-jpa #124

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

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

kendricbeachey commented 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);
g00glen00b commented 2 years ago

@kendricbeachey thanks for the feedback. I updated my blog post to clarify how to use the specifications.

antrix190 commented 2 years ago

Nice one!

hendisantika commented 1 year ago

Nice article. I think it would be better if you put the code in GitHub.

Thanks