title: How to use Arel::Nodes::TableAlias in an initial where statement
body: <p>I got stuck on this and for sure it's easy, but I just cannot find the solution in the docs.</p>
  
  <p>I have some tree structure and the child where clause that I have to filter with an "exists" sub query:</p>
  
  <pre><code>current_node.children.as("children_nodes").where(Node.where(...).exists)
  </code></pre>
  
  <p>The Node.where.clause already joins to the children_nodes and it works if I use two different models. But how do I use the alias? Above code will result in:</p>
  
  <pre><code>NoMethodError (undefined method `where' for #&lt;Arel::Nodes::TableAlias
  </code></pre>
  
  <p>It's so basic, but something I'm missing (I'm too new to arel).</p>