Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Query By Example functionality in JPA

Do you know a way of implementing something like a Hibernate QBE (Query by Example) in JPA?

For my problem domain the alternative of using it will be to build a SQL query dynamically using some sort of string manipulation, something I would like to avoid.

I know this is not supported by default in the API, but I recognize it as a great technique for building dynamic queries.

Any suggestions?

like image 710
Jose Diaz Avatar asked Dec 03 '22 03:12

Jose Diaz


1 Answers

QBE is not available in JPA 1.0 or 2.0. For more details look here

like image 98
Aravind Yarram Avatar answered Dec 16 '22 20:12

Aravind Yarram