📅  最后修改于: 2022-03-11 14:52:45.143000             🧑  作者: Mango
Criteria criteria = getSession().createCriteria(MainTable.class);
criteria.createAlias("anotherTableVariable", "t2"); // Alias with association variable
criteria.add(Restrictions.eq("t2.name", name));