title: Mapstruct - ignore fields from nested collection - not working when cloning the object
body: <p>I have the following entity classes and similar DTO classes:</p>
  
  <pre><code>class Car {
      Long id;
      List&lt;Owner&gt; ownerList;
  }
  
  class Owner {
      Long id;
      String name;
  }
  </code></pre>
  
  <p>I used MapStruct with following mappings to :</p>
  
  <ol>
  <li>copy to CarDto without IDs</li>
  </ol>
  
  <pre><code>    @Mapping(target = "id", ignore = true)
      @Mapping(target = "ownerList", qualifiedByName = "withoutIdDto")
      CarDto carToCarDto(Car car);
  
      @Named("withoutIdDto")
      @Mapping(target = "id", ignore = true)
      OwnerDto mapOwnerDtoWithoutId(Owner owner);
  </code></pre>
  
  <ol start="2">
  <li>clone without IDs</li>
  </ol>
  
  <pre><code>    @Mapping(target = "id", ignore = true) //ignore Car.id
      @Mapping(target = "ownerList", qualifiedByName = "withoutId")
      Car copyCar(Car car);
  
      @Named("withoutId")
      @Mapping(target = "id", ignore = true) //ignore Owner.id
      Owner mapOwnerWithoutId(Owner owner);
  </code></pre>
  
  <p><strong>The problem is:</strong></p>
  
  <p>The generated mapper for carToCarDto() is calling mapOwnerDtoWithoutId() but copyCar method is not calling mapOwnerWithoutId(). Here's the snippet of generated methods:</p>
  
  <pre><code>public Car copyCar(Car car) {
      if (car == null) {
          return null;
      } else {
          Car car1 = new Car();
          List&lt;Owner&gt; list = car.getOwnerList();
          if (list != null) {
              car1.setOwnerList(new ArrayList(list)); // no reference to mapOwnerWithoutId
          }
  
          return car1;
      }
  }
  
  public CarDto carToCarDto(Car car) {
      if (car == null) {
          return null;
      } else {
          CarDto carDto = new CarDto();
          carDto.setOwnerList(this.ownerListToOwnerDtoList(car.getOwnerList())); //ownerListToOwnerDtoList () calls mapOwnerDtoWithoutId
          return carDto;
      }
  }
  </code></pre>
  
  <p>I've following project to reproduce this. Any idea how to fix the test CarMapperTest?</p>
  
  <p><a href="https://github.com/gtiwari333/mapstruct-failing-test-same-object-copy" rel="nofollow noreferrer">https://github.com/gtiwari333/mapstruct-failing-test-same-object-copy</a></p>