i'm trying out a criteria build dynamically from information i get from say a beaninfo object.
say A-->C one to many. i want to add an expression such that i want results only if A.getMultiC() (which results a List of Cs) has more than one element in it. now i 'wish' i could add something like this but this results in a ambiguous query.
Code:
Criteria c = s.createCriteria(ClassA.class)
.add(Expression.like("testString", "Hello%"))
.add(Expression.gt("multiC", new Integer(1)));
if i add "multiC" with .createCriteria() then of course it will introspect each of the list elements but that's not what i'm looking for.
probably just my usage issue?
regards
ravi