title: Hibernate Envers : Embedded extended MappedSuperClass raise exception on startup
body: <p>I'm currently trying to use Hibernate Envers on my project, but I got the following exception. I think it's because of MedicalSummaryId which contains no data and extends a mapped superclass, but I don't see how fix it.</p>
  
  <p>I'm using Hibernate 4.3.8.Final.</p>
  
  <p>Exception :</p>
  
  <pre><code>Caused by: org.hibernate.MappingException: Type not supported: org.hibernate.type.ComponentType
      at org.hibernate.envers.configuration.internal.metadata.IdMetadataGenerator.addIdProperties(IdMetadataGenerator.java:97)
      at org.hibernate.envers.configuration.internal.metadata.IdMetadataGenerator.addId(IdMetadataGenerator.java:161)
      at org.hibernate.envers.configuration.internal.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:598)
      at org.hibernate.envers.configuration.internal.EntitiesConfigurator.configure(EntitiesConfigurator.java:107)
      at org.hibernate.envers.configuration.spi.AuditConfiguration.&lt;init&gt;(AuditConfiguration.java:130)
      at org.hibernate.envers.configuration.spi.AuditConfiguration.getFor(AuditConfiguration.java:180)
      at org.hibernate.envers.event.spi.EnversIntegrator.integrate(EnversIntegrator.java:76)
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:312)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)
      ... 87 more
  </code></pre>
  
  <p>MedicalHistory.java</p>
  
  <pre><code>@Entity
  @Audited
  public class MedicalHistory extends BaseEntity {
      @EmbeddedId MedicalHistoryId medicalHistoryId = new MedicalHistoryId();
      @NotNull String description;
  }
  </code></pre>
  
  <p>MedicalHistoryId.java</p>
  
  <pre><code>@Embeddable
  public class MedicalHistoryId implements Serializable {
      @NotNull public MedicalSummaryId medicalSummaryId;
      @NotNull public long id = 0;
  }
  </code></pre>
  
  <p>MedicalSummaryId.java</p>
  
  <pre><code>@Embeddable
  public class MedicalSummaryId extends AggregateRootId{
       // no data
  }
  </code></pre>
  
  <p>AggregateRoot.id</p>
  
  <pre><code>@Embeddable
  @MappedSuperclass
  public class AggregateRootId implements Serializable {
      protected Integer id;
  }
  </code></pre>
  
  <p>Thanks for your help.</p>