title: Many to One Mapping using Set
body: <p>I have two Table, supplier and company.</p>
  
  <p>Companies will already be setup. While creating supplier, I will be getting a list of companies, to which supplier supplies the goods.</p>
  
  <p>List will be of containing companies_id, which is primary key of company.
  While inserting supplier details in supplier table, I want to Map the supplier to companies which he supllies in company Table.</p>
  
  <p>I am doing this mapping in my SupplierEO</p>
  
  <pre><code>@ManyToOne(cascade = CascadeType.ALL,fetch=FetchType.EAGER, targetEntity = CompanyEO.class)
      @JoinColumn(name="Company_ID")
      public Set&lt;CompanyEO&gt; getCompanyEO() {
          return companyEO;
      }
  
  public void setCompanyEO(Set&lt;CompanyEO&gt; companyEO) {
      this.companyEO = companyEO;
  }
  </code></pre>
  
  <p>Am getting following error while saving supplier details</p>
  
  <blockquote>
    <p>org.hibernate.PropertyAccessException: IllegalArgumentException
    occurred calling getter of CompanyEO.carrierId</p>
  </blockquote>