title: Entity without Primary Key ID
body: <p>Hi I want to create an Entity which doesn't have an ID.</p>
  
  <pre><code>@Entity
  @Table(name="USER_PROD_LIC_TYPE_ALL")
  public class UserProdLicTypeAll {
     @EmbeddedId
     private UserProdLicTypeAllPK id;
  
     @ManyToOne(fetch=FetchType.LAZY)
      @JoinColumn(name="USER_ID")
      private User user;
  
      @ManyToOne(fetch=FetchType.LAZY)
      @JoinColumn(name="LICENSE_TYPE_ID") 
      private LicenseType licType;
      ....
    }
  </code></pre>
  
  <p>since it doesn't have primary key i created Embeddable class as below:</p>
  
  <pre><code> @Embeddable
   public class UserProdLicTypeAllPK {
  
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="USER_ID")
    private User user;
  
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="LICENSE_TYPE_ID")
    private LicenseType licType;
    ...
   }
  </code></pre>
  
  <p>The combination of these two fields returns a unique value. 
  But it doesn't work.  I get </p>
  
  <p><code>org.springframework.beans.factory.UnsatisfiedDependencyException:  exception</code>. </p>
  
  <p>Do i need to have references in User and LicenseType entities for both UserProdLicTypeAll and UserProdLicTypeAllPK? I have tried that also but still it doesn't work.</p>