title: getting error during the creation of relationship between JPA entities
body: <p>I'm trying to create entities but I got the following error.</p>
  
  <pre><code>Internal Exception: Exception [EclipseLink-7157] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.ValidationException
  Exception Description: Entity class [class application.Team] must use a @JoinColumn instead of @Column to map its relationship attribute [mPlayers].
  </code></pre>
  
  <p>These are my entities, I need to store data into the database using the Java Persistence API (JPA). To do so I create entities as following. Maybe I have created the relationships between entities in the wrong way.</p>
  
  <p><strong>Person</strong></p>
  
  <pre><code>@MappedSuperclass
  public class Person {
   @Id
   @GeneratedValue( strategy= GenerationType.AUTO )
   protected int p_id;
  
   protected String firstName;
   protected String middleName;
   protected String lastName;
   protected String phone; 
   protected String email;
  
   public Person() {
   }
  }
  </code></pre>
  
  <p><strong>Player</strong></p>
  
  <pre><code>    @Entity
  @Table( name = "tbl_players")
  @AttributeOverride(name="id", column=@Column(name="player_id"))
  public class Player extends Person implements Serializable{
      private int player_id;
  
      @Column(name = "goals_in_year")
      private int numberOfGoalsInCurrentYear;
  
      private boolean goalie;
  
      @Column(name = "defended_goals")
      private int defendedGoals;
  
      public Player(){
  
      }
   }
  </code></pre>
  
  <p><strong>Manager</strong></p>
  
  <pre><code>@Entity
  @Table( name = "tbl_manager")
  @AttributeOverride(name="id", column=@Column(name="manager_id"))
  public class Manager extends Person implements Serializable{
      private String dob;
      private int starRating;
  
      @OneToOne
      private Team teamToManage;
  
      public Manager(){
      }
  }
  </code></pre>
  
  <p><strong>Team</strong></p>
  
  <pre><code>@Entity
  @Table( name = "tbl_team")
  public class Team implements Serializable {
      @Column(name = "team_name")
      @Id
      String teamName;
  
      @OneToOne
      Manager manager;
  
      @Column(name = "team_players")
      @OneToMany
      private List&lt;Player&gt; mPlayers = new ArrayList&lt;&gt;();
  
      @Column(name = "jersey_color")
      String jerseyColor;
  
      public Team(){
      }
  }
  </code></pre>
  
  <p><strong>League</strong></p>
  
  <pre><code>@Entity
  public class League {
      @Id
      private int league_id;
  
      @OneToMany
      @Column(name = "League Teams")
      private List&lt;Team&gt; mTeam = new ArrayList&lt;&gt;();
  
      public void addTeam(Team team) {
          mTeam.add(team);
      }
  
      public void removeTeam(Team team) {
          mTeam.remove(team);
      }
  }
  </code></pre>