SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
174 stars 111 forks source link

$filter does not work properly #2093

Open hashtagnulla opened 2 months ago

hashtagnulla commented 2 months ago

The problem:

Filtering contents fails when I have multiple expressions chained with AND, and surrounded with a NOT operator. For example not ((Name eq 'Administrator') and isOf('Group')) will omit every content that has type Group or name Administrator, instead of one specific group that has a name Administrator.

Solution hint: SenseNet.ContentRepository.Linq.OptimizeBooleanVisitor has an unknown bug when must not occurrence needed to optimize. Called in: SnExpression line 86