hql 转 sql

时间:2020-04-15 00:22:33   收藏:0   阅读:63
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();

原文:https://www.cnblogs.com/knowledgemine/p/12702361.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!