title: Jpa ManyToMany Self Reference without auxiliar Join Table
body: <p>I'd like to tell entity to join with itself for a field that it's not unique in both directions, but it looks like all examples in internet use a Join table or either are pretty old.</p>
  
  <p><em>Person</em> Denormalized Table:</p>
  
  <pre><code>PersonId (Pk) | RoleId | ParentRoleId
    1               1         NULL
    2               1         NULL
    3               2          1
    4               2          1
  </code></pre>
  
  <p><em>Person</em> Entity (With mappings that seem to load an empty list):</p>
  
  <pre><code>@Column
  private Long personId;
  
  @Column
  private Long roleId;
  
  @Column
  private Long parentRoleId;
  
  @ManyToMany
  @JoinColumn(name = "parentRoleId", referencedColumnName = "roleId", updatable = false, insertable = false)
  private List&lt;Person&gt; personsWithParentRole;
  
  @ManyToMany
  @JoinColumn(name = "roleId", referencedColumnName = "parentRoleId", updatable = false, insertable = false)
  private List&lt;Person&gt; personsWhoseRoleHasCurrentPersonRoleAsParent;
  </code></pre>
  
  <p>I would like to know if there's a way to map my case. I know it's not the best arch or the most performant, and that one can use a different approach, but please I am just wondering about that particular solution. This is a simplification from a most complex case.</p>