title: How to use the @ManyToMany with two lists on the same table
body: <p>I have a situation where an entity could use another entity, and it could be used by another, so i have defined a ManyToMany relation that reference the same entity, so i could have listUse and listUsedBy, and both are persisted in the same table entity_usage : </p>
  
  <pre><code>@ManyToMany
  @JoinTable(name = "entity_usage",
          joinColumns = {
              @JoinColumn(name = "id_use", referencedColumnName = "id")},
          inverseJoinColumns = {
              @JoinColumn(name = "id_used_by", referencedColumnName = "id")})
  private List&lt;Entity&gt; listUse;
  
  @ManyToMany
  @JoinTable(name = "entity_usage",
          joinColumns = {
              @JoinColumn(name = "id_use_by", referencedColumnName = "id")},
          inverseJoinColumns = {
              @JoinColumn(name = "id_use", referencedColumnName = "id")})
  private List&lt;Entity&gt; listUsedBy;
  </code></pre>
  
  <p><strong>Exemple</strong> : Entity <strong>A</strong> could use Entity <strong>B</strong> and <strong>C</strong>, so Entity <strong>B</strong> and <strong>C</strong> are used by <strong>A</strong>. 
  Now my problem is when i add B and C to listUse, they are persisted in entity_usage, but when try to display listUsedBy i have to redeploy my project, otherwise listUsedBy remains empty, is there a way to refresh listUsedBy when persist my entity without having to redeploy my project.</p>