join table in where clause criteria in java hibernate
Criteria criteria = getSession().createCriteria(MainTable.class);
criteria.createAlias("anotherTableVariable", "t2"); // Alias with association variable
criteria.add(Restrictions.eq("t2.name", name));