title: How to correctly do single field n1ql projections with spring-data-couchbase
body: <p>I'm trying to project a single field in a document. I tried a couple of approaches - one mentioned here in this <a href="https://docs.spring.io/spring-data/couchbase/docs/2.2.4.RELEASE/reference/html/#_dto_projections" rel="nofollow noreferrer">Spring data Couchbase doc</a> and another mentioned in this <a href="https://stackoverflow.com/a/38479557/3441543">question</a></p>
  
  <p>All of it returns the same exception</p>
  
  <pre><code>org.springframework.data.couchbase.core.CouchbaseQueryExecutionException:    
  Unable to execute query due to the following n1ql errors: {"msg":"Ambiguous reference to field _class.","code":3000}
      at org.springframework.data.couchbase.core.CouchbaseTemplate.findByN1QL(CouchbaseTemplate.java:458) ~[spring-data-couchbase-3.0.6.RELEASE.jar:3.0.6.RELEASE]
  </code></pre>
  
  <p>Below is the query that I am using and it runs as expected on the <code>Query workbench</code> </p>
  
  <pre><code>public interface ProjectRespository extends CouchbasePagingAndSortingRepository&lt;Project, String&gt; {
  
       @Query("SELECT DISTINCT projectId where #{#n1ql.filter} AND serverTech = $1")   
        List&lt;ProjectIdDTO&gt; findByServerTech(@Param("serverTech") String serverTech);
  </code></pre>
  
  <p><code>ProjectIdDTO</code> is a DTO I have specifically defined to return a List of ProjectId's. Not sure what is that I am missing here.</p>