title: Lazy Fetch JPA Getting JoinCoulmn MappedBy ID
body: <p>Here is the situation </p>
  
  <pre><code>      @Entity
        public class Table_A implements Serializable {
  
        //TABLE_A FIELDS
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "TABLE_BID")
      public Table_B getTable_B() {
      return table_B;
  }
        }
  </code></pre>
  
  <p>So A many to one relationship exist between Table_A and Table_B
  My question is when i do a </p>
  
  <pre><code>Long tableB_ID = table_A.getTable_B().getTable_BID();
  </code></pre>
  
  <p>In JPA/Hibernate implementation does the fetch get an instance of the TABLE_B and get corrsponding ID from it </p>
  
  <p>or</p>
  
  <p>Gets the ID from the mapped Column?</p>
  
  <p>Thanks in Advance for the answers.</p>