Hibernate:HQL,转为SQL
2019-06-13 本文已影响0人
BETWEENAND
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.hql.ast.QueryTranslatorImpl;
QueryTranslatorImpl translator = new QueryTranslatorImpl("queryIdentifier", hql,
Collections.EMPTY_MAP, (SessionFactoryImplementor) getSessionFactory());
translator.compile(Collections.EMPTY_MAP, false);
translator.getSQLString();