Hello,
i'm trying to make dynamic search using Query By Example in a object with one association, where the fields of the associated object aren't mandatory for search. But if the fields were informed, then i made the search with these too, but this not's working.
Code:
Criteria criteria = getSession().createCriteria(Father.class);
Example afExample = Example.create(parent)
.ignoreCase().enableLike(MatchMode.ANYWHERE);
Example transExample = Example.create(parent.getChildren())
.excludeZeroes().ignoreCase().enableLike(MatchMode.ANYWHERE);
criteria.createCriteria("children").add(transExample);
criteria.list();
Any help?[/code]