Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.6
I have implemented some filtering of data using CreateCriteria which works fine for the first level objects:
crit = session.createCriteria(PortfolioList.class);
crit.createCriteria(EmployeeTeam).add(Expression.ilike(
"status", "A",
MatchMode.ANYWHERE));
How can I provide filtering when the data provided refers to a lower level. In the above case where EmployeeTeam is a mapping object mapping employees to teams I would want to filter based on say a team description
something like:
crit = session.createCriteria(PortfolioList.class);
crit.createCriteria(EmployeeTeam).add(Expression.ilike(
"team.description", "UK",
MatchMode.ANYWHERE));
However this does not work. Am i going about this completely the wrong way?