Query : select project from Project as project join project.users user where user.userID=:userId
Example:
List
@Override
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
String lHql="select project from Project as project join project.users user where user.userID=:userId";
Query lQuery=session.createQuery(lHql);
lQuery.setLong("userId", pUserId);
List
return lProject;
}
});
No comments:
Post a Comment