Feb 9th, 2012, 08:56 AM
Does Spring Data JPA support QBE?
QBE in conjunction with search criteria is the most powerful query approach to me. Will Spring Data JPA eventually support the types of queries that SpringFuse generates - extended QBE that matches not only fields but relationships, plus date range criteria?
Feb 12th, 2012, 09:38 AM
It would be great indeed to add Query By Example support directly in Spring Data JPA.
Currently, our QBE approach supports only fields, see for example:
Note that we also support any range thanks to this code:
You can then mix the example and the range specification...
This is indeed quite powerful. If you have some idea on how to take relationship into account, we'd be happy to implement it.
Feb 14th, 2012, 08:51 AM
The code generated by SpringFuse - a RAD tool, explicitly maps foreign keys to entity attributes aside from the corresponding relationships, so that QBE covers entity attributes as well as the foreign keys (relationship), very handy approach.