title: How to query a property of type List<String>in JPA
body: <p>Lets say we have this JPA-annotated class, with a property of type List. This code is currently working fine.</p>
  
  <pre><code>@Entity
  public class Family {
      ...
      @CollectionOfElements(targetElement=java.lang.String.class)
      @JoinTable(name = "elements_family",
          joinColumns = @JoinColumn(name = "idFamily")
      )
      @Column(name = "element", nullable = false)
      private List&lt;String&gt; elements;
      ...
  }
  </code></pre>
  
  <p>Is there any way to query for the list of Families that contain the element "yyy" ? That is, something like:</p>
  
  <pre><code>Query query = getEntityManager().createQuery("select f FROM Family f WHERE element = :element");
  query.setParameter("element", "yyy");
  return query.getResultList();
  </code></pre>