title: How to do deep copy of inner objects from Hibernate Entity to DTO?
body: <p>I have entity class</p>
  
  <pre><code>public Class StudentEntity{
      private int id;
      private String name;
      private AddressEntity address;
      private ProfileEntity profile;
      //getter setter
  }
  
  public Class StudentDTO{
      private int id;
      private String name;
      private AddressDTO address;
      private ProfileDTO profile;
      //getter setter
  }
  </code></pre>
  
  <p>when I use <code>BeanUtils.copyProperties();</code> (from spring/apache common) it copies the <code>id</code> and <code>name</code> alone. How to copy the <code>address</code> and <code>profile</code> also?</p>
  
  <p>If custom util has to be written, could you please share the snippet?</p>