title: Searching across of 2x entities JPA
body: <p>I have two entities of JPA, Game and GameScore which are connected. If player join game a new GameScore is made for him. But i need to get Games where is not joined player(does not have GameScore). How I can do that? I tried by NamedQueries and CriteraBulder but without result.</p>
  
  <p>Game endity:</p>
  
  <pre><code>package prayForHunt.model;
  
  import java.io.Serializable;
  import java.util.Date;
  import java.util.List;
  import javax.persistence.*;
  @Entity
  @NamedQueries({
  @NamedQuery(name = Game.Q_GET_ALL_GAMES, query = "SELECT c FROM Game c"),
  })
    public class Game implements Serializable {
  
  //--------------------------------------------
  @Id
  @GeneratedValue
  private int gameId;
  //--------------------------------------------      
  @OneToMany(cascade = CascadeType.ALL, mappedBy = "game")
  private List&lt;GameScore&gt; gameScore;
  }
  </code></pre>
  
  <p>GameScore entity</p>
  
  <pre><code>package prayForHunt.model;
  
  import java.io.Serializable;
  import java.util.List;
  import javax.persistence.*;
  import javax.persistence.metamodel.SingularAttribute;
  
  @Entity
  @NamedQueries(
  @NamedQuery(name = GameScore.Q_GET_ALL_GAMESCORE, query = "SELECT c FROM GameScore c")
  )
  public class GameScore implements Serializable {
  
  @Id
  @GeneratedValue
  private int gameId;
  @ManyToOne
  protected Game game;
  @ManyToOne
  protected Player player;
  
   }
  </code></pre>