title: JPA Query over a join table
body: <p>I have 3 tables like:</p>
  
  <pre><code>A                              AB                        B
  -------------                  ------------              ---------------
  a1                              a1,b1                    b1
  </code></pre>
  
  <p>AB is a transition table between A and B</p>
  
  <p>With this, my classes have no composition within these two classes to each other. But I want to know that , with a JPQL Query, if any records exist for my element from A table in AB table. Just number or a boolean value is what I need.</p>
  
  <p>Because AB is a transition table, there is no model object for it and I want to know if I can do this with a @Query in my Repository object.</p>