title: How to use @AttributeOverrides when used method access to property?
body: <p>I have an Embeddable class with <strong>method access</strong> to properties. It works fine until there two or more inclusions in one other class where I have to use @AttributeOverrides.</p>
  
  <p>At this case I receive the following error from Hibernate:</p>
  
  <blockquote>
    <p>Repeated column in mapping for entity: ... column: grn_date (should be
    mapped with insert="false" update="false")</p>
  </blockquote>
  
  <p>It seems Hibernate for some reasons doesn't understand method access. If I use common property-access all works fine, but I need current one to get Calendar date from XMLGregorianCalendar field.</p>
  
  <p><strong>Embeddable class:</strong></p>
  
  <pre><code>@Embeddable
  @Access(AccessType.FIELD)
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "...")
  public class GrnType {
  
      @XmlAttribute(name = "...")
      @Transient
      protected String grn;
  
      @XmlAttribute(name = "...", required = true)
      @Transient
      protected XMLGregorianCalendar dateOfEntry;
  
      @Transient
      private Calendar calendarDate;
  
  
      @Access(AccessType.PROPERTY)
      @Column(name = "grn")
      public String getGrn() {
          return grn;
      }
  
      @Access(AccessType.PROPERTY)
      @Column(name = "grn_date")
      private Calendar getCalendarDate() {
           if(dateOfEntry!=null) {
               return new GregorianCalendar(dateOfEntry.getYear(), dateOfEntry.getMonth(), dateOfEntry.getDay());
           }else {
               return null;
           }
      }
  
      //   ...setters here
  
  }
  </code></pre>
  
  <p>Class where embedded:</p>
  
  <pre><code>@Entity
  @Table(name="RealEstateDFl")
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "", propOrder = {...})
  public class GrnEntity {
  
      //...
      @Embedded
      @AttributeOverrides({
              @AttributeOverride(name = "grn", column = @Column(name = "grn_main")),
              @AttributeOverride(name = "grn_date", column = @Column(name = "grn_date_main"))
      })
      protected GrnType grnType;
  
      @Embedded
      @AttributeOverrides({
              @AttributeOverride(name = "grn", column = @Column(name = "grn_sec")),
              @AttributeOverride(name = "grn_date", column = @Column(name = "grn_date_sec"))
      })
      protected GrnType grnTypeSecondary;
  
      //...
  }
  </code></pre>
  
  <p>Could anyone advice how to override attributes properly at this case? Or what might be the solution?</p>