title: Hibernate @ManyToOne references an unknown entity
body: <p>I am receiving the following Hibernate Exception:</p>
  
  <p><code>@OneToOne or @ManyToOne on Matchup.awayTeam references an unknown entity: Team</code></p>
  
  <p>The simplified Matchup class looks like this:</p>
  
  <pre><code>@Entity public class Matchup implements Serializable 
  {
     protected Team awayTeam;
  
     @ManyToOne 
     @JoinColumn(name="away_team_id")
     public Team getAwayTeam() {
        return awayTeam;
     }
  }
  </code></pre>
  
  <p>The simplified Team class looks like this:</p>
  
  <pre><code>@Entity
  public class Team implements Serializable {
      protected List&lt;Matchup&gt; matchups;
  
      @OneToMany(mappedBy="awayTeam", targetEntity = Matchup.class,
      fetch=FetchType.EAGER, cascade=CascadeType.ALL)
      public List&lt;Matchup&gt; getMatchups() {
         return matchups;
      }
  }
  </code></pre>
  
  <p>Notes:</p>
  
  <ul>
  <li>Both Matchup and Team have subclasses. I'm not sure if this impacts the situation.</li>
  <li>Both Matchup and Team are listed in my persistence.xml as being
  included.</li>
  <li>If I put @Transient annotations on both getter methods, the error
  disappears.</li>
  </ul>
  
  <p>Can anybody shed light on why this exception is occurring?</p>