title: Flutter Moor join and where
body: <p>My Dependencies for moor:</p>
  
  <pre><code>  moor_flutter: ^2.1.1
    moor_ffi: ^0.4.0
  </code></pre>
  
  <p>I have the tables:</p>
  
  <ul>
  <li>netPoint = Information about the netPoint</li>
  <li>netPointNetPoint = linking of netpoints</li>
  </ul>
  
  <p>I want all netPoints that match the "PARENTS_ID" s. below.</p>
  
  <p><strong>My problem</strong> is that I cannot access netPointNetPoint in the Where condition.</p>
  
  <pre><code>select(netPoint)
      ..where((t) =&gt; t.TYPE.equals(type))
      ..join(
          [
            innerJoin(netPointNetPoint, netPointNetPoint.CHILDREN_ID.equalsExp(netPoint.ID)),
            innerJoin(netPointNetPoint, netPointNetPoint.PARENTS_ID.equals(parentId))
          ]
      )
    ).get();
  </code></pre>
  
  <p>Unfortunately the help page <a href="https://moor.simonbinder.eu/docs/advanced-features/joins/" rel="nofollow noreferrer">https://moor.simonbinder.eu/docs/advanced-features/joins/</a> did not help me. </p>