and below query was yielding expected results with out any issues for given tenantId , one or more region string as input.
@Query(value = "SELECT * FROM at "
+ "WHERE at.tenantId = @tenantId "
+ "AND (@regions = null or ARRAY_CONTAINS(@regions, at.region)) ")
List<ArchiveTransaction> findAllArchiveTransByRegions(
@Param("tenantId") String tenantId,
@Param("regions") List<String> regions);
But when we upgraded our version to 3.26.0 it is returning data only for given tenentId and no region.
It is NOT returning any data for given tenentId and one or more region as input.
@Query(value = "SELECT * FROM at "
+ "WHERE at.tenantId = @tenantId "
+ "AND (@regions = null or ARRAY_CONTAINS([@regions], at.region)) ")
List<ArchiveTransaction> findAllArchiveTransByRegions(
@Param("tenantId") String tenantId,
@Param("regions") List<String> regions);
we had to change the query to include square brackets around @regions like [@regions] for it to work.
Even with that change it works only for a single input tenentId and single input of region , when we input two or more region as input the query is failing with error " Syntax error, incorrect syntax near ','. " .
Hello Team,
We were using azure-spring-data-cosmos 3.25.0 for our api.
and below query was yielding expected results with out any issues for given tenantId , one or more region string as input.
But when we upgraded our version to 3.26.0 it is returning data only for given tenentId and no region. It is NOT returning any data for given tenentId and one or more region as input.
we had to change the query to include square brackets around @regions like [@regions] for it to work. Even with that change it works only for a single input tenentId and single input of region , when we input two or more region as input the query is failing with error " Syntax error, incorrect syntax near ','. " .
Looks like this bug was introduced in 3.26.0 , please fix it.