Because the equality is not true anymore.
Let's say Asset.companyLevel
is 6. When you select the option that corresponds to 6, you get a match. But if you select another option, let's say 8, your parameter becomes "6, 8"
, and 6 is not equal to "6, 8"
.
I don't think there's a perfect solution to this with named queries, but you could explore:
- using a query string parameter
- use
like '%:nivelFilter%'
instead of an equality comparison - build your query dynamically with a dynamically built list of placeholders then use
runPrepQuery
- maybe you could solve this with sql scripts and stored procedures ?