title: error as metioned below
body: <p>There is a employee class which has a set of languages known by him.   </p>
  
  <blockquote>
    <p>error :Exception in thread "main" org.hibernate.MappingException:
    Could not determine type for: java.util.Set, at table: Employee_Table,
    for columns: [org.hibernate.mapping.Column(languages)]</p>
  </blockquote>
  
  <p>Employee.java</p>
  
  <pre><code>    package Mapping.Collection.Set;
  
      import java.util.*;
  
      import javax.persistence.*;
      @Entity
      @Table(name="Employee_Table")
      public class Employee {
          @Id
          @GeneratedValue(strategy=GenerationType.AUTO)
          private int empId;
          @Column(name="EMP_NAME",nullable=false)
          private String empName;
          public int getEmpId() {
              return empId;
          }
          public void setEmpId(int empId) {
              this.empId = empId;
          }
          public String getEmpName() {
              return empName;
          }
          public void setEmpName(String empName) {
              this.empName = empName;
          }
          public int getSalary() {
              return salary;
          }
          public void setSalary(int salary) {
              this.salary = salary;
          }
          private int salary;
  
  
          @ElementCollection(targetClass=String.class)
          @JoinColumn(name="Languages_Known")
          private Set&lt;String&gt; languages=new HashSet&lt;&gt;();
  
          public Set&lt;String&gt; getLanguages() {
              return languages;
          }
          public void setLanguages(Set&lt;String&gt; languages) {
              this.languages = languages;
          }
  
  
  
  
      }
  
  
      TestMain.java
      package Mapping.Collection.Set;
  
      import org.hibernate.Session;
      import org.hibernate.SessionFactory;
      import org.hibernate.Transaction;
      import org.hibernate.cfg.AnnotationConfiguration;
  
      public class TestMain {
  
          /**
           * @param args
           */
          public static void main(String[] args) {
              Employee emp=new Employee();
              emp.setEmpId(1);
              emp.setEmpName("Shrini Jaiswal");
              emp.setSalary(10000000);
              emp.getLanguages().add("Hindi");
              emp.getLanguages().add("English");
              SessionFactory factory=new AnnotationConfiguration().configure().buildSessionFactory();
              Session session=factory.openSession();
              Transaction tx=session.beginTransaction();  
              tx.begin();
              session.save(emp);
              tx.commit();
                  session.close();
          }
  
      }
  </code></pre>