Spring data custom N1QL query returns property document to null

I have found a solution. The correct query is:

SELECT META(ipdb).id AS _ID, META(ipdb).cas AS _CAS,ipdb.* FROMipdbWHERE ...
The best practice is to use the methods of N1qlUtils, you can look at the example below:

Statement statement = N1qlUtils.createSelectClauseForEntity(template.getCouchbaseBucket().name()).
  from(Expression.i(template.getCouchbaseBucket().name()))
    .where(".....");

createSelectClauseForEntity and from methods build the a part of query.

Bye,