title: I need to write a JPQL query which returns the elements that contains all listed tags
body: <p>I have two entity</p>
  
  <p>`@Entity
  @Table(name = "quiz_questions")
  public class QuizQuestion {</p>
  
  <pre><code>@Id
  @Column(name = "id")
  @GeneratedValue(strategy = GenerationType.AUTO)
  @JsonView(ShortSummary.class)
  private Long id;
  
  @Column(name = "title", nullable = false)
  @JsonView(ShortSummary.class)
  private String title;
  
  @Column(name = "text", nullable = false, length = 4096)
  @JsonView(ShortSummary.class)
  private String text;
  
   /**
   * List of tags, which include the question
   */
  @JoinTable(name = "quiz_questions_tags",
  joinColumns = @JoinColumn(name = "quiz_question_id"),
  inverseJoinColumns = @JoinColumn(name = "tag_id"))
  @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.REFRESH,   CascadeType.MERGE}) // do not add PERSIST
  @JsonView(ShortSummary.class)
  private Set&lt;Tag&gt; tags;
  </code></pre>
  
  <p>}
  `
  and</p>
  
  <p>`@Entity
  @Table(name = "tags")
  public class Tag implements Serializable {</p>
  
  <pre><code>@Id
  @Column(name = "id")
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Integer id;
  
  @Column(name = "tag")
  private String tag;
  </code></pre>
  
  <p>}`</p>
  
  <p>I need to write a query that returns a list of questions to which there are ALL of these tags.
  In repository I have method</p>
  
  <pre><code> @Query("SELECT DISTINCT q FROM QuizQuestion q JOIN q.tags u WHERE u IN :tags  ") // working, but the output even if one tag is associated with the question
     List&lt;QuizQuestion&gt; findTag (@Param("tags") Set&lt;Tag&gt; tags);
  </code></pre>
  
  <p>I do not know how to write correctly this request. Help me!</p>