title: JPA - Wrong number of column of same class. should be 2
body: <p>I trying to map my class to database,the class reference to itself by "id_comment_parent", but when running a test, I get the following error:</p>
  
  <pre><code>Caused by: org.hibernate.AnnotationException: A Foreign key refering com.ecommerce.entities.Comment from com.ecommerce.entities.Comment has the wrong number of column. should be 2
  at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:646) ~[hibernate-core-5.4.10.Final.jar:5.4.10.Final]
  at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:102) ~[hibernate-core-5.4.10.Final.jar:5.4.10.Final]
  at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processEndOfQueue(InFlightMetadataCollectorImpl.java:1814) ~[hibernate-core-5.4.10.Final.jar:5.4.10.Final]
  </code></pre>
  
  <p>these is my classe:</p>
  
  <pre><code>@Entity
  @Table(name = "comment", catalog = "Ecommerce_db")
  public class Comment implements Serializable {
  
      @EmbeddedId
      @AttributeOverrides({
              @AttributeOverride(name = "idComment", column = @Column(name = "id_comment", nullable = false)),
              @AttributeOverride(name = "idCommentParent", column = @Column(name = "id_comment_parent", nullable = false)) })
      private CommentId id;
      @Column(name = "id_user", nullable = false)
      private long idUser;
      @Column(name = "comment", length = 65535)
      private String comment_1;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "id_comment_parent", nullable = false, insertable = false, updatable = false)
      private Comment comment;
  
  }
  </code></pre>
  
  <p>anyone have any idea?</p>