title: Orika Nested Mappers
body: <p>I need to implement nested mappers using Orika. How should I need to do it? Let's discuss simple objects which are nested</p>
  
  <pre><code>Class Person(){
  Address address;
  String firstName;
  String lastname;
  }
  
  Class Address(){
  String street;
  String city;
  String zipcode;
  }    
  </code></pre>
  
  <p>Lets assume that I have separate java mapper for address object. How shall I use the external Java mapper in the below field mapping in orika?</p>
  
  <p>customize() option in the field mapping is to map the complex fields explicitly in the .classMap mapping, which will make the current map complex to read when the objects are pretty big.</p>
  
  <pre><code>public class Mapper extends ConfigurableMapper {
    protected void configure(MapperFactory factory) {
      factory.classMap(Person.class, PersonDto.class)
        .byDefault()
        .register();      
    }
  }
  </code></pre>