I am a little fixated on building a dynamic query using CriteriaBuilder JPA 2.0.
I have a fairly common case, I suppose: The user provides an arbitrary number of X search parameters that must be and / or concatenated: for example:
select e from Foo where (name = X1 or name = X2 .. or name = Xn )
The Builder method or criterion is not dynamic:
Predicate or (Predicate ... restrictions)
Ideas? Samples?
Ben Mar 24 '10 at 17:45 2010-03-24 17:45
source share