Spring Data Azure Cosmos DB (v5.3.0 & Java17)
The result of the following query did not match the expectations.
Define method at DataClassRepository:
@Query("select * from c where c.val in ( @val )")
List<DataEntity> queryNg(@Param("val") List<Long> val);
call mathod at ApplicationClass#run:
List<DataEntity> ngList = dataRepository.queryNg(Arrays.asList(Long.valueOf(1)));
Expected to receive one result, but instead received zero results. If the query is executed to match only one id instead of specifying multiple ids with the in clause it's returned the expected result.
The main question is whether there is a way to use numeric values such as Long in the filter condition of a query that includes the "in" clause.
Main suspects that the issue occurred because the filter is internally treated as a string.
|
List<String> expandParam = ((Collection<?>) parameters[paramIndex]).stream() |
Spring Data Azure Cosmos DB (v5.3.0 & Java17)
The result of the following query did not match the expectations.
Define method at DataClassRepository:
call mathod at ApplicationClass#run:
List<DataEntity> ngList = dataRepository.queryNg(Arrays.asList(Long.valueOf(1)));Expected to receive one result, but instead received zero results. If the query is executed to match only one id instead of specifying multiple ids with the in clause it's returned the expected result.
The main question is whether there is a way to use numeric values such as Long in the filter condition of a query that includes the "in" clause.
Main suspects that the issue occurred because the filter is internally treated as a string.
azure-sdk-for-java/sdk/spring/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/repository/support/StringBasedCosmosQuery.java
Line 73 in 115e796