title: Filter elements of fetched collection. EclipseLInk. Criteria API
body: <p>I have an object:</p>
  
  <pre><code>@Entity
  @Table(name = "users", catalog = "adm", uniqueConstraints = @UniqueConstraint(columnNames = "loginUser"))
  public class User implements GenericEntityPK&lt;Integer&gt; {
  
      private Set&lt;Permission&gt; permissions = new HashSet&lt;Permission&gt;(0);
  @ManyToMany(fetch = FetchType.LAZY)
      @JoinTable(name = "user_l_permission", catalog = "adm", joinColumns = {
              @JoinColumn(name = "idUser", nullable = false, updatable = false) }, inverseJoinColumns = {
                      @JoinColumn(name = "idPermission", nullable = false, updatable = false) })
      public Set&lt;Permission&gt; getPermissions() {
          return this.permissions;
      }
  }
  </code></pre>
  
  <p>I want to select user entity and fetch collection of permissions, with where clause. In other words permissions collection must contain only elements that satisfy where conditions.
  I've tried to do it with <strong>SetJoin</strong> but with no success..</p>
  
  <p>Is there a way to do it?</p>