title: How to make a reflexive one-to-many relationship inside a model?
body: <p>In the database there is a table having a reflexive one-to-many relationship :</p>
  
  <pre><code>create table structure 
  (
     struct_code          varchar2(15)         not null,
     str_struct_code      varchar2(15),
     struct_lib           varchar2(255),
     struct_sigle         varchar2(10),
     struct_comment       clob,
     struct_interne       smallint             default 1,
     constraint pk_structure primary key (struct_code)
  );
  
  alter table structure add constraint fk_structur_associati_structur foreign key (str_struct_code) references structure (struct_code);
  </code></pre>
  
  <p>I created the corresponding model :</p>
  
  <pre><code>@Entity
  @Table(name = "structure")
  public class Structure {
  
      @Id()
      @Column(name="struct_code") 
      private String code;
  
      @Column(name="struct_sigle")
      private String sigle;
  
      @Column(name="struct_lib")
      private String lib;
  
      @Column(name="struct_interne")
      private Integer interne;
  
      @ManyToOne
      @JoinColumn(name = "struct_code")
      private Structure sousStructure;
  
      public Structure() {
          super();
      }
  
      public Structure(String code) {
          super();
      }
  
      // getters and setters
  
  }
  </code></pre>
  
  <p>But when I built the project then I got the error : <code>mappingexception repeated column in mapping for entity : com.ambre.pta.model.Structure column: struct_code (should be mapped with insert="false" update="false")</code></p>
  
  <p>So how to write correctly the reflexive relation ?</p>