title: Embedding attributes from a many-to-one relationship
body: <p>Given the <code>COUNTRIES</code> and <code>REGIONS</code> tables from <a href="http://docs.oracle.com/database/121/COMSC/diagrams.htm#COMSC112" rel="nofollow">Oracle Database HR sample schema</a>:</p>
  
  <pre><code>COUNTRIES(country_id, country_name, region_id)
  REGIONS(region_id, region_name)
  </code></pre>
  
  <p>And this <code>Country</code> entity class:</p>
  
  <pre><code>import javax.persistence.*;
  
  @Entity
  @Table(name = "COUNTRIES")
  public class Country {
      @Id
      @Column(name = "COUNTRY_ID")
      private String id;
  
      @Column(name = "COUNTRY_NAME")
      private String name;
  }
  </code></pre>
  
  <p>I would like to map both tables within a single <code>Country</code> entity class, that is, without creating a separate <code>Region</code> entity class.</p>
  
  <p>Instead of this many-to-one relationship:</p>
  
  <pre><code>@ManyToOne
  @JoinColumn(name = "REGION_ID")
  private Region region;
  </code></pre>
  
  <p>I would like to have a simple <code>String regionName</code> attribute mapped to <code>REGIONS.REGION_NAME</code>, using <code>REGIONS.REGION_ID = COUNTRIES.REGION_ID</code> as the join condition.</p>
  
  <p>Is this kind of mapping supported in JPA 2.0? Which annotations should I use?</p>