openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Beer <david.m.b...@gmail.com>
Subject Build SQL Query
Date Thu, 25 Jul 2013 12:47:56 GMT
Hi All

I am trying to add a query which contains multiple search items. The 
user can enter/select one or up to three values to search against. I 
won't necessarily know which values they have selected except through 
checking if the item is null. The problem is how best do I create a 
query which I can build which is basically a WHERE clause and using AND 
to define the extra values. Would I have to write the SQL manually or is 
there a way to build the query using CriteriaQuery and CriteriaBuilder?

Thanks

David

Mime
View raw message