JPA - FindByExample

前端 未结 7 2010
故里飘歌
故里飘歌 2020-12-08 04:29

Does anyone have a good example for how to do a findByExample in JPA that will work within a generic DAO via reflection for any entity type? I know I can do it via my prov

7条回答
  •  青春惊慌失措
    2020-12-08 05:08

    You should check the solution proposed by Springfuse using Spring Data & JPA 2.

    http://www.springfuse.com/2012/01/31/query-by-example-spring-data-jpa.html

    Some sample source code here (under repository sub package): https://github.com/jaxio/generated-projects

    Found this project: https://github.com/jaxio/jpa-query-by-example

提交回复
热议问题