title: How to access object graph in javers
body: <p>I have two entities Employee and Address. </p>
  
  <p>Employee.java</p>
  
  <pre><code>public class Employee {
  
  private Long id;
  private String firstName;
  
  public Long getId() {
      return id;
  }
  
  public void setId(Long id) {
      this.id = id;
  }
  
  public String getFirstName() {
      return firstName;
  }
  
  public void setFirstName(String firstName) {
      this.firstName = firstName;
  }    
  
  }
  </code></pre>
  
  <p>Address.java</p>
  
  <pre><code>public class Address {
  
  public Address(Long addressId, String address, Long id) {
      this.addressId = addressId;
      this.address = address;
      this.id = id;
  }
  
  public Address() {
  
  }
  
  @Id
  private Long addressId;
  private Long employeeId;
  private String address;
  
  public Long getAddressId() {
      return addressId;
  }
  public void setAddressId(Long addressId) {
      this.addressId = addressId;
  }
  public Long getEmployeeId() {
      return employeeId;
  }
  public void setEmployeeId(Long employeeId) {
      this.employeeId= employeeId;
  }
  public String getAddress() {
      return address;
  }
  public void setAddress(String address) {
      this.address = address;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Useing Javers api i want all the changes made by Employee including Address.</p>
  
  <p>suppose employeeId e1 with name e made some change in address a1 with address xyz and employeeId e1</p>
  
  <pre><code>Changes changes = javers.findChanges(QueryBuilder.byInstanceId(id,com.mybatis.emo.bean.Employee.class).withNewObjectChanges(true).build());
  </code></pre>
  
  <p>I want address changes also comes while querying employee.</p>