title: Eclipselink history of related objects
body: <p>I can create history of an entity with a HistoryCustomizer</p>
  
  <pre><code>@Entity
  @Customizer(MyHistoryCustomizer.class)
  public class Employee {..}
  </code></pre>
  
  <p>the HistoryCustomizer is something like this one:</p>
  
  <pre><code>public class MyHistoryCustomizer implements DescriptorCustomizer {
      public void customize(ClassDescriptor descriptor) {
          HistoryPolicy policy = new HistoryPolicy();
          policy.addHistoryTableName("EMPLOYEE_HIST");
          policy.addStartFieldName("START_DATE");
          policy.addEndFieldName("END_DATE");
          descriptor.setHistoryPolicy(policy);
      }
  }
  </code></pre>
  
  <p>The history objects can be fetched with the "AS_OF" hint</p>
  
  <pre><code>javax.persistence.Query historyQuery = em
                      .createQuery("SELECT e FROM Employee e", Employee.class)
                      .setParameter("id", id)
                      .setHint(QueryHints.AS_OF, "yyyy/MM/dd HH:mm:ss.SSS")
                      .setHint(QueryHints.READ_ONLY, HintValues.TRUE)
                      .setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);
  </code></pre>
  
  <p>just fine BUT, if you start accessing objects referenced by this historical object, the referenced objects will be the actual version of them. So the Employee from last year (fetched by a historical query) will have the current Address assigned to it and no the one it used to have last year.</p>
  
  <p>How can I tell EclipseLink (2.5.0) to fetch the related object from the past as well?</p>