Closed spring-projects-issues closed 1 year ago
David Kelly commented
I did a simpler one:
@Query("#{#n1ql.selectEntity} where callsign In $callsigns")
List<Airport> findByCallsigns(JsonArray callsigns);
And this one works as I'd expect - the query generated looks like this (from trace logging):
2019-06-28 15:55:36,501 DEBUG .repository.query.AbstractN1qlBasedQuery: 151 - Executing N1QL query: {"statement":"SELECT META(`travel-sample`).id AS _ID, META(`travel-sample`).cas AS _CAS, `travel-sample`.* FROM `travel-sample` where callsign In $callsigns","$callsigns":["CITRUS","TXW"],"scan_consistency":"statement_plus"}
What was the query actually generated? I'm guessing I'm missing something, but JsonArray as a parameter seems to be working as expected for this simple thing I've done above
https://github.com/spring-projects/spring-data-couchbase/issues/1650 Added converters for JsonNode, JsonObject and JsonArray
Labusquiere opened DATACOUCH-337 and commented
I'm expecting :
generate the following :
I did try with varargs, array and debug a bit and for me it s today impossible. Am I wrong? is there an other way to do it with
@Query
or it is not supported ?Affects: 2.1.11 (Hopper SR11), 2.2.8 (Ingalls SR8), 3.0 GA (Kay)