如何在sqlRestriction中的hibernate中使用别名.. 这是我的代码,但它不起作用,它不能识别" emet"和" dest"作为别名
criteria.createAlias("personne", "emet", JoinFragment.INNER_JOIN);
criteria.createAlias("destinataire", "dest", JoinFragment.INNER_JOIN)
.createCriteria("fichier")
.add(Restrictions.sqlRestriction("({alias}.codic SIMILAR TO 'U[AB0-9]{4}' and emet.cod = 'ERF') OR (emet.codic SIMILAR TO '[^U]%' and dest.codic like 'AA%') OR (emet.codic SIMILAR TO 'U[AB0-9]{4}' and {dest}.codic SIMILAR TO '[^U]%')"));