dynamic-linq-query-builder icon indicating copy to clipboard operation
dynamic-linq-query-builder copied to clipboard

"not_equal" operator not working correctly on collection

Open arundhatip opened this issue 4 years ago • 2 comments
trafficstars

Description of bug "not_equal" operator is not working as expected on collections. "equal" operator works fine.

Anyone else has faced same issue?

Here is working fiddle. https://dotnetfiddle.net/gxMX71

arundhatip avatar Dec 03 '20 17:12 arundhatip

Looks to be a bug with collections specifically. I'll try and get around to a fix at some point in the near future, contributions also welcome.

tghamm avatar Dec 03 '20 20:12 tghamm

I think what we need is a new extra FLAG for the rule to decide whether it's "any" or "all" when it comes to collections, as each one has a valid use case.

Currently for lists: Equal means : any value equal Not Equal means : any not equal Same for in and contains

I think the right behavior (default value for the FLAG) for and/in/contains should be "any" as they are now, but for not to be "all".

Ibrahemkhalil avatar Mar 04 '22 21:03 Ibrahemkhalil