title: How to resolve No converter found capable of converting from type TupleBackedMap to type [com.example.dto.ExampleDto]
body: <pre><code>org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [com.example.dto.ExampleDto]
  at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:321) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
  at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:194) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
  at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:174) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
  at org.springframework.data.repository.query.ResultProcessor$ProjectingConverter.convert(ResultProcessor.java:293) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
  </code></pre>
  
  <p>The above error is being thrown when I have a query that returns 2 values in a native JPA query is being used. I'm capturing the query response in the DTO below:</p>
  
  <pre><code>@Data
  @Entity
  @NoArgsConstructor
  @AllArgsConstructor
  @Builder
  public class ExampleDto {
      @Id
      private String name1;
      private int nameFlag;
  }
  </code></pre>
  
  <p>And in a DAO class, I'm calling the native query as below. The query works in SQL Developer and returns 2 records. But when called as below , it throws the above error.</p>
  
  <pre><code>List&lt;ExampleDto&gt; getExampleDto = myJPARepository.
                  .findNameObject(uuid);
  </code></pre>
  
  <p>There is something wrong in the DTO class, which i need to change. Annotations? I'm not sure what is missing here, and try as I might , putting in @Entity annotation, @Data annotation , I'm not able to resolve this error when the query is called.</p>
  
  <p>UPDATE: The native query associated with this is </p>
  
  <pre><code>@Query(value = "select name1, nameFlag from NameTable",
            nativeQuery = true, name = "findNameObject where namekey = ?")
      List&lt;ExampleDto&gt; findNameObject(
              @Param("nameKey") UUID nameKey);
  </code></pre>