title: Nested embeddable - AttributeOverride for embeddable within embeddable
body: <p>I have class Money which is an @Embeddable</p>
  
  <pre><code>@Embeddable
  public class Money implements Serializable, Comparable&lt;Money&gt; {
      @Column(name = "amount", precision = 15, scale = 2)
      private BigDecimal amount;
  }
  </code></pre>
  
  <p>When I useit multiple time inside entity, everything works fine. For example</p>
  
  <pre><code>@Entity
  public class SomeEntity implements Serializable {
  
      @Embedded
      @AttributeOverride(name = "amount", column = @Column(name = "entry"))
      private Money entryValue;
  
      @Embedded
      @AttributeOverride(name = "amount", column = @Column(name = "leave"))
      private Money leaveValue;
  }
  </code></pre>
  
  <p>Code above works perfectly.</p>
  
  <p>Now the problem occurs when I have another @Embeddable that I want to have Money instances in it and that @Embeddable is used by an entity multiple times. Example:</p>
  
  <ol>
  <li><p>Embeddable</p>
  
  <pre><code>@Embeddable
  public class ReportCostValues implements Serializable {
  
      @Embedded
      @AttributeOverride(name = "amount", column = @Column(name = "covered_by_grant"))
      private Money coveredByGrant;
  
      @Embedded
      @AttributeOverride(name = "amount", column = @Column(name = "own_resources"))
      private Money foundedFromOwnResources;
  
      @Embedded
      @AttributeOverride(name = "amount", column = @Column(name = "personal_contribution"))
      private Money personalContribution;
  </code></pre></li>
  <li><p>Entity</p>
  
  <pre><code> @Entity
   public class ReportCostEntity implements Identifiable&lt;Long&gt;, Serializable {
  
      @Id
      private Long id;
  
      @Embedded       
      private ReportCostValues contracted;
  
      @Embedded       
      private ReportCostValues current;
  
      @Embedded        
      private ReportCostValues previousReport;
  </code></pre></li>
  </ol>
  
  <p>This code above will not work. Any ideas how to approach this problem?</p>