private Value getSubquery(JPQLNode node) {
final boolean subclasses = true;
// parse the subquery
ParsedJPQL parsed = new ParsedJPQL(node.parser.jpql, node);
Context subContext = new Context(parsed, null, ctx());
contexts.push(subContext);
ClassMetaData candidate = getCandidateMetaData(node);
Subquery subq = subContext.getSubquery();
if (subq == null) {
subq = factory.newSubquery(candidate, subclasses, nextAlias());
subContext.setSubquery(subq);
}
subq.setMetaData(candidate);
// evaluate from clause for resolving variables defined in subquery
JPQLNode from = node.getChild(1);