title: @AssociationOverride does not create @JoinColumn from scratch
body: <p>I have a group of tables, that are all identical apart from their owner table, and the corresponding foreign keys to that table. I made it all generic thanks to Hibernate/JPA, but cannot pass the <code>@JoinColumn</code> information via <code>@AssociationOverride</code> since the <code>name</code> value for it is ignored, or not overridden at all.</p>
  
  <p>For example;</p>
  
  <pre><code>@Data
  @Entity
  @Table(name = "etc")
  @AssociationOverride(name = "parent", joinColumns = @JoinColumn(name = "id"))
  public class RealEntity extends BaseEntity&lt;ParentEntity, String&gt; {
  }
  </code></pre>
  
  <p>with;</p>
  
  <pre><code>@Data
  @MappedSuperClass
  public class BaseEntity&lt;K, P&gt; implements Serializable {
  
      @EmbeddedId
      protected Key&lt;K&gt; key = new Key&lt;&gt;();
  
      @MapsId("fk")
      @ManyToOne
      @JsonBackReference
      protected P parent;
  
      @Data
      @Embeddable
      public static class Key&lt;K&gt; implements Serializable {
  
          protected K fk;
  
          @Column(name = "sub_id")
          protected String subId;
      }
  }
  </code></pre>
  
  <p>parent:</p>
  
  <pre><code>@Data
  @Entity
  @Table(name = "parentc")
  public class ParentEntity implements Serializable {
  
      @Column(name = "id")
      protected String parentId;
  }
  </code></pre>
  
  <p>So as you see, it works well except for the parent's fk reference definition, I get mapping error since Hibernate tries to find a <code>parent_id</code>, rather than just <code>id</code> for the foreignKey, since <code>@JoinColumn</code> override is ignored. It works if I put the parent information in the <code>RealEntity</code> directly (obviously), or if I put <code>@JoinColumn(name = "id")</code> on <code>parent</code> in <code>BaseEntity</code> but I want to keep it as generic as possible. Is there any solution to this issue? Or should I just give up?</p>
  
  <p><strong><em>edit</em></strong>: it seems when I put a proper <code>@JoinColumn</code> with acceptable mapping for joining on <code>parent</code> in <code>BaseEntity</code>, that does get overridden, so it needs something valid to override. I cannot just add an association from nothingness is that the case? I've seen many examples on the web where they were putting associations from scratch, my usage of <code>@MapsId</code>, might be breaking the usage I guess. But I cannot change my current structure, since it is necessary to be able to represent composite foreign key definition for dependent child tables... I feel like there is a very simple solution, or some hacky way to achieve what I want, and I cannot seem to find it!</p>