I am using release 2.3.2
IN operator query is not working when using to filter related entity field,Please find example below
Query 1 : /A?$expand=B($filter=C/Code in ('0997' ,'0999'))
Query 2 : /B?$filter=C/Code in ('0997' ,'0999')
Response :
{
"error": {
"code": null,
"message": "Cannot invoke "org.hibernate.query.sqm.tree.expression.SqmExpression.getTupleLength()" because "left" is null"
}
}
In the above query A,B & C are the entities where A is related to B and B is related to C . so whenever we are trying to filter related field Code from the entity C to filter B data, we are getting above error response.
Simple filter on the same entity field is working fine without error, please find example below
Query 3 : /C?$filter=Code in ('0997' ,'0999')
Note : To enable IN operator i have added below line in JPAOdataSessionContextAccess
.useQueryDirectives().maxValuesInInClause(10).build()