what if i want only list not the whole json object
@Query(“Select namelist from
test
where #{n1ql filter} And ANY v In namelist SATISFIES v Like ‘%’ || $1 ‘%’ END within #{n1ql ucket}”)
then it throws error
org.springframework.data.couchbase.core.CouchbaseQueryExecutionException: Unable to retrieve enough metadata for N1QL to entity mapping, have you selected _ID and _CAS?
So after searching i found his post Custom N1QL query with Couchbase and Spring Boot but after writing this query ,
@Query(“Select meta().usedcarimages , meta().id as _ID, meta().cas as _CAS From #{n1ql ucket} where #{n1ql .filter} AND ANY imagename IN usedcarimages SATISFIES imagename Like ‘%’ || $1 || ‘%’ END”)
List< String> findByUsedcarimagesContains(String fileName);
then i cant map directly to List< String> it gives error as above mapping error. so i added class name but only got id value and all other null values.
Cant i fetch values in List< String >?