logger.debug("First-level parse tree for " + namedQuery.name() + ":");
parser.showAst(hqlAst, System.out);
}
SessionImplementor hibernateSession = em.unwrap(SessionImplementor.class);
ASTQueryTranslatorFactory translatorFactory = new ASTQueryTranslatorFactory();
query = (QueryTranslatorImpl) translatorFactory.createQueryTranslator(
namedQuery.name(), jpaQuery, java.util.Collections.EMPTY_MAP, hibernateSession.getFactory());
query.compile(Collections.EMPTY_MAP, false);
if (query.getReturnTypes().length != 1) {