title: Hibernate: search for entities that contains a value in a set of enums
body: <p>I have an entity similar to the following example:</p>
  
  <pre><code>@Entity
  @Table(name = "AIRPLANE")
  public class Airplane {
  
      @ElementCollection(targetClass = Color.class, fetch = FetchType.LAZY)
      @CollectionTable(name = "AIRPLANE_COLORS", joinColumns = @JoinColumn(name = "AIRPLANE_ID"))
      @Column(name = "AIRPLANE_COLOR")
      @ForeignKey(name = "FK_AIRPLANE_COLOR_ID")
      @Enumerated(EnumType.STRING)
      private Set&lt;Color&gt; colors;    
      ...
  }
  ...
  public enum Color {
      WHITE, RED, BLUE
  }
  </code></pre>
  
  <p>Where colors is a Set of enums, and I want to make a search for all entities Airplanes that contains the color RED in this set.</p>
  
  <p>Can I make that with Criterias or should I use HQL queries?</p>
  
  <p>Thanks!</p>