title: Construct JPA query for a OneToMany relation
body: <p>I've those 2 entities</p>
  
  <pre><code>Class A {
      @OneToMany(mappedBy="a")
      private List&lt;B&gt; bs;
  }
  
  Class B {
  
      @ManyToOne
      private A a;
  
      private String name;
  }
  </code></pre>
  
  <p>1) I would like to construct a query that says get all A's that have at least one B with name ="mohamede1945"</p>
  
  <p>2) I would like to construct a query that says get all A's that don't have any B with name = "mohamede1945"</p>
  
  <p>Could anyone help me?</p>