title: How to add an extra column to a join table in spring data JPA
body: <p>I am creating a <code>JoinTable</code> to hold a <code>Member</code> and <code>Event</code> but I also want to have a column to hold the score of the <code>Member</code> for this <code>Event</code> Many <code>Member</code> can enter Many <code>Event</code>.</p>
  <p><code>score</code> is not an Entity of Java object, but would just be an <code>int</code></p>
  <p>Is there a way to do this without making a Score Entity?</p>
  <p>So far, My <code>Member</code> entity,</p>
  <pre><code>//Create a join table to hold the event_id and member_id to create a list of events this member has entered.
      @JsonIgnore
      @ManyToMany
      @JoinTable(
              name = &quot;event_member&quot;,
              joinColumns = @JoinColumn(name = &quot;event_id&quot;),
              inverseJoinColumns = @JoinColumn(name = &quot;member_id&quot;))
      List&lt;Event&gt; eventsentered;
  </code></pre>
  <p><code>Event</code> entity</p>
  <pre><code>//Relationship for member and events entered
      @JsonIgnore
      @ManyToMany(mappedBy = &quot;eventsentered&quot;, fetch = FetchType.EAGER)
      List&lt;Member&gt; members;
  </code></pre>
  <p>This creates a nice join table, and I can get all the <code>Member</code> who enter an event, but I need to record their <code>score</code> somehow.</p>
  <p>I have had a look at a few other questions on here, but the links they refer to no longer seem to exist.</p>