title: Mapping List<String> from List<Object> using mapstruct
body: <p>Hi I am getting null for List action in DTO while setting it from the Child Source class using mapstruct. Could some help me in resolving this. Please find my code here</p>
  
  <p>Entity Class:</p>
  
  <pre><code>public class Source {
      int id;
      String name;
      List&lt;ChildSource&gt; childSource;
      //getters and setters
  }
  
  public class ChildSource {
      String code;
      String action;
      //getters and setters   
  }
  </code></pre>
  
  <p>DestinationDTO:</p>
  
  <pre><code>public class TargetDTO{
      int sNo;
      String mName;
      List&lt;String&gt; actions;
      //getters and setters  
  }
  </code></pre>
  
  <p>MApper Class:</p>
  
  <pre><code>@Mapper(componentModel = "spring")    
  public abstract class SampleMapper {
          @Mappings({ 
              @Mapping(target = "id", source = "sno"),
              @Mapping(target = "name", source = "mNAme")
          })
          public abstract TargetDTO toDto(Source source);
  
          @IterableMapping(elementTargetType = String.class)
          protected abstract List&lt;String&gt; mapStringtoList(List&lt;ChildSource&gt; childSource);
  
          protected String mapChildSourceToString(ChildSource child) {
              return child.getAction();
          }
      }
  </code></pre>
  
  <p>But my action list is setting as null in the target dto. Could anyone help me here please?</p>