title: Several possible source properties for target property "address"
body: <pre><code>@Mapper(componentModel = &quot;spring&quot;, injectionStrategy = InjectionStrategy.CONSTRUCTOR)
  public abstract class FooMapper {
  
      @Autowired
      static AddressMapper addressMapper;
  
      @Mapping(source = &quot;entity.id&quot;, target = &quot;id&quot;)
      @Mapping(target = &quot;address&quot;, qualifiedByName = &quot;mappingAddress&quot;)
      public abstract FooEntity dtoAndEntityToEntity(FooDto dto, FooEntity entity);
      
      @Named(&quot;mappingAddress&quot;)
      static AddressEntity mappingAddress(FooDto dto, FooEntity entity) {
          if (Objects.nonNull(dto) &amp;&amp; Objects.nonNull(dto.getAddress())) {
              return addressMapper.dtoToEntity(dto.getAddress());
          }
          if (Objects.nonNull(entity)) {
              return entity.getAddress();
          }
          return null;
      }
  }
  </code></pre>
  <p>I want to map the address even from entity of dto, if dto is null, I should to use entity info, I used that custom method, but I got and error :</p>
  <pre><code>Error:(27,41) java: Several possible source properties for target property &quot;address&quot;.
  </code></pre>
  <p>The error is clear, the error happen because entity and dto have address attribute, but I don't want to set the <code>source</code>, I want it to be deducted from entity or dto.</p>
  <p>Is there any way to avoid this error please?</p>