title: How do I do a multi-level properties query in JCR 2.0 SQL2?
body: <p>I want to do something like this, but in JCR_SQL2 (since XPATH is now deprecated in JCR 2.0).</p>
  
  <pre><code>    QueryManager queryManager = session.getWorkspace().getQueryManager();
      String queryExpression = 
          NodeNames.PLUGIN.jcrName()+"[@"+NodeProps.ID.jcrName()+"='"+pluginId+"']"
          +"/"+
          NodeNames.PLATFORM.jcrName()+"[@"+NodeProps.NAME.jcrName()+"='"+platform+"']"
          +"/"+
          NodeNames.VERSION.jcrName()+"[@"+NodeProps.VERSION.jcrName()+"='"+version+"']";
      query = queryManager.createQuery( queryExpression, Query.XPATH);
      return query.execute().getNodes().nextNode();
  </code></pre>
  
  <p>I can get the first node like this:</p>
  
  <pre><code>    Query query = queryManager.createQuery(
              "select * from [nt:unstructured] as p where p.["+NodeProps.ID.jcrName()
              +"] = '"+pluginId+"'", Query.JCR_SQL2);
      Node pluginNode = query.execute().getNodes().nextNode();
  </code></pre>
  
  <p>But then how do I query beneath that node only?</p>