Hibernate Criteria Query Compiler 被什么取代了?

What was Hibernate's CriteriaQueryCompiler replaced with?

基本上我想使用这个答案为我的项目提供 的代码,但编译器给我错误。文档提到 CriteriaQueryCompiler 是一个临时实现。

NOTE : This is a temporary implementation which simply translates the criteria query into a JPAQL query string. A better, long-term solution is being implemented as part of refactoring the JPAQL/HQL translator.

我正在使用 Hibernate 4.3.9。是否有 CriteriaQueryCompiler 的类似实现?

使用这个导入,

进口org.hibernate.jpa.criteria.compile.RenderingContext;

然后将函数参数中的CriteriaQueryCompiler.RenderingContext改为->RenderingContext。