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?
In JPA 2.0 the closest equivalent is called the Criteria API. It did not exist in JPA 1.0.
Here is a sample: