dimitri.codes icon indicating copy to clipboard operation
dimitri.codes copied to clipboard

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

Open utterances-bot opened this issue 2 years ago • 4 comments

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

utterances-bot avatar Jul 07 '22 21:07 utterances-bot

Having built a Specification according to these instructions, you use it by giving it to your repository like this:

myRepository.findAll(specificationIJustBuilt);

kendricbeachey avatar Jul 07 '22 21:07 kendricbeachey

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

g00glen00b avatar Jul 08 '22 09:07 g00glen00b

Nice one!

antrix190 avatar Sep 13 '22 14:09 antrix190

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

Thanks

hendisantika avatar Oct 03 '22 04:10 hendisantika