title: Hibernate Key-Generation
body: <p>I defined the primary-key of my entity Attribute like this:</p>
  
  <pre><code>@Id @GeneratedValue(strategy = IDENTITY)
      @Column(name = "id", unique = true, nullable = false)
  </code></pre>
  
  <p>My option values are mapped in the entity Attribute:</p>
  
  <pre><code>@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "attribute")
      public Set&lt;AttributeOptions&gt; getAttributeOptionses() {
  </code></pre>
  
  <p>The primary keys of AttributesOptions are the attributeId and a optionId.
  The problem: Primary key of the AttributeOptions is not generated, if I persist/create the Attribut-Entity with new AttributeOptions. How can I fix that?</p>
  
  <p>Thx, Simone </p>