title: Mapping A List of Enum to A Field in PostgreSQL With Hibernate/Spring Data
body: <p>There are quite many samples of mapping an array or list of a primitive data type such as integer or string to a database field in PostgreSQL with Hibernate. I am wondering whether it is possible to map a list of Enum to a database field without an additional DB table in PostgreSQL with Hibernate or not. Here is one of use case. </p>
  
  <pre><code>public enum Language {
      EN, FR, ZH
  }
  
  @Entity
  @Table(name = "person")
  public class Person {
  
     @Id
     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
     @SequenceGenerator(name = "sequenceGenerator")
     private long id;        
  
     private List&lt;Language&gt; languages ;
     ...
  }
  </code></pre>