Closed
Description
Eduard Dudar opened DATACOUCH-649 and commented
With Spring Data Couchbase 3.x I had a few custom counting queries written like
@Query("SELECT COUNT(*) FROM ... WHERE ...")
but upon upgrading to 4.x the same code fails with #block terminated with an error
and an error being NPE in mapper. While inspecting closer what's going on, I can see that ReactiveFindByQueryOperationSupport.count()
has this mapping operation
row -> row.getLong(TemplateUtils.SELECT_COUNT)
and expects a field named count
but Couchbase returns $1: 0
. Changing queries to
@Query("SELECT COUNT(*) AS count FROM ... WHERE ...")
works but I haven't found any requirement in the docs for this and it is working with 3.x so I feel like this is a regression
No further details from DATACOUCH-649