Hi Team,
Can we give the filed name dynamically from the java code to repository, please guide me.
My Query looks like below
String QUERY_BY_PARAMS = "#{#n1ql.selectEntity} WHERE #{#n1ql.filter} " +
"AND planningGroupEventId = $1 " +
"AND rangeProductChangeType in $2 " +
"#{#country == null ? ‘’ : 'AND country = $3 '} " +
"#{#queryKeyword == null ? ‘’ : 'AND $4 = true '} ";
@Query(QUERY_BY_PARAMS)
Mono<Long> countByParams(
Integer planningGroupEventId,
List<String> changeTypes,
String country,
String queryKeyword
);
Here queryKeyword is the filed name which is boolean, which we are trying to read through $4.
Thanks,
Kurien.