title: JPA: embedded an embeddable entity with embeddedid inside it
body: <p>I have an entity that embed another entity with an embeddeid inside it. When i use the first entity i get this exception:</p>
  
  <pre><code>it.test.tesctclassPK must not have @Id properties when used as an @EmbeddedId: it.test.firstClass.test.id
  </code></pre>
  
  <p>but in the key class there is no @id annotation and not even in the embedded class.</p>
  
  <h1>Edit</h1>
  
  <p>Firstclass is the not embedded class, test is the embeddable class and testpk is the embeddeid of the embeddable class.</p>
  
  <h1>Edit 2</h1>
  
  <p>FirstClass</p>
  
  <pre><code>@Entity
  @Table(name = "sometable", schema = "someschema")
  public class FirstClass implements Serializable {
      private static final long serialVersionUID = 1L;
      private FirstClassPK id;
      @Embedded
      private Test test;
      public FirstClass() {
      }
      /*various attribute getters and setters*/
  }
  </code></pre>
  
  <p>Test</p>
  
  <pre><code>@Entity
  @Table(name="sometable", schema="somechema")
  @Embeddable
  public class Test implements Serializable {
      private static final long serialVersionUID = 1L;
      private TestPK id;
      public Test() {
      }
  
      @EmbeddedId
      public TestPK getId() {
          return this.id;
      }
      /*various attribute, getters and setters*/
  }
  </code></pre>
  
  <p>TestPk</p>
  
  <pre><code>Test
  
  @Entity
  @Table(name="sometable", schema="somechema")
  @Embeddable
  public class TestPk implements Serializable {
      private static final long serialVersionUID = 1L;
  
      public TestPk() {
      }
  
      /*various attribute, getters and setters*/
  }
  </code></pre>