title: Dto to Entity conversion using MapStruct gives error
body: <p>I am trying to create a mapper of "PersonDto" class to "PersonEntity" using <a href="http://mapstruct.org" rel="nofollow noreferrer">MapStruct</a></p>
  
  <p>Please consider the following Entity, Dto and Mapper classes.</p>
  
  <p><strong>PersonEntity.java</strong>   </p>
  
  <pre><code>package com.example.car;
  
  import java.util.ArrayList;
  import java.util.List;
  
  public class PersonEntity {
      private String name;
      private List&lt;CarEntity&gt; cars;
  
      public PersonEntity() {
          cars = new ArrayList&lt;&gt;();
      }
  
      public boolean addCar(CarEntity carEntitiy) {
          return cars.add(carEntitiy);
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public List&lt;CarEntity&gt; getCars() {
          return cars;
      }
  
      public void setCars(List&lt;CarEntity&gt; carEntities) {
          this.cars = carEntities;
      }
  }
  </code></pre>
  
  <p><strong>CarEntity.java</strong>   </p>
  
  <pre><code>package com.example.car;
  
  public class CarEntity {
      private String model;
  
      public String getModel() {
          return model;
      }
  
      public void setModel(String model) {
          this.model = model;
      }
  }
  </code></pre>
  
  <p><strong>PersonDto.java</strong>   </p>
  
  <pre><code>package com.example.car;
  
  import java.util.ArrayList;
  import java.util.List;
  
  public class PersonDto {
      private String name;
      private List&lt;CarDto&gt; cars;
  
      public PersonDto() {
          cars = new ArrayList&lt;&gt;();
      }
  
      public boolean addCar(CarDto carDto) {
          return cars.add(carDto);
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public List&lt;CarDto&gt; getCars() {
          return cars;
      }
  
      public void setCars(List&lt;CarDto&gt; carDtos) {
          this.cars = carDtos;
      }
  }
  </code></pre>
  
  <p><strong>CarDto.java</strong> </p>
  
  <pre><code>package com.example.car;
  
  public class CarDto {
      private String model;
  
      public String getModel() {
          return model;
      }
  
      public void setModel(String model) {
          this.model = model;
      }
  }
  </code></pre>
  
  <p><strong>PersonMapper</strong></p>
  
  <pre><code>package com.example.car;
  
  import org.mapstruct.CollectionMappingStrategy;
  import org.mapstruct.Mapper;
  import org.mapstruct.factory.Mappers;
  
  @Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED)
  public interface PersonMapper {
  
      PersonMapper INSTANCE = Mappers.getMapper(PersonMapper.class);
  
      PersonEntity personDtoToPersonEntity(PersonDto personDto);
  }
  </code></pre>
  
  <p>When I am trying to generate code using the maven instructions provided at <a href="http://mapstruct.org/documentation/installation/" rel="nofollow noreferrer">this</a> link I am receiving the following error:</p>
  
  <blockquote>
    <p>Can't map property "java.util.List cars" to
    "com.example.car.CarEntity cars". Consider to declare/implement a
    mapping method: "com.example.car.CarEntity
    map(java.util.List value)".</p>
  </blockquote>
  
  <p>If i remove the "adder" method from Person classes it works fine. But I really want to use adder methods (for JPA entities parent child relationship purpose).</p>
  
  <p>I am not sure why MapStruct not interpreting the cars property in PersonEntity as List. It is interpreting that property as a simple CarEntity and not the List of CarEntity.</p>