Current filter:
                                You should refresh the page.
                                  • There is an issue in our DevExpress.Xpo.SecurityCriteriaBuilder code. It unexpectedly removes the Count aggregate so that it gets an invalid: "() = 0".

                                    Steps to reproduce

                                    Source criteria:

                                    [SomeReference.Oid] In ({SomeGuid}) And ([SomeCollection][].Count() = 0 Or [SomeCollection][[Oid] = {SomeGuid}] Or [SomeCollection][[Oid] = {SomeGuid}]) And [SomeProperty] = True


                                    Incorrectly patched criteria:

                                    [SomeReference.Oid] In ({SomeGuid}) And (() = 0 Or [SomeCollection][[Oid] = {SomeGuid}] Or [SomeCollection][[Oid] = {SomeGuid}]) And [SomeProperty] = True


                                    You can use the MainDemo.Win application to replicate this behavior. Log in as Sam and apply the following criteria (ContainsOperator) to the Contact_ListView:
                                    [C#]
                                    <Views> <ListView Id="Contact_ListView" Criteria="[Tasks][].Count() = 0" /> </Views>


                                    Workaround
                                    In the YourSolutionName.Wxx/WxxApplication.xx file, modify the overridden CreateDefaultObjectSpaceProvider method to use the MySecuredObjectSpaceProvider class from the attached file (Class1.cs):

                                    [C#]
                                    protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) { args.ObjectSpaceProviders.Add(new YourSolutionName.Win.MySecuredObjectSpaceProvider((SecurityStrategyComplex)Security, args.ConnectionString, args.Connection, true)); //... }

                                    This workaround also bypasses the following issues:
                                        Security - A ListView's Criteria may be corrupted in the Integrated Mode under certain circumstances (T688297)
                                        Security - Unable to cast object of type 'DevExpress.Data.Filtering.GroupOperator' to type 'DevExpress.Data.Filtering.BetweenOperator' exception occurs when opening the SchedulerListEditor (T690824)
                                        Security - Security System denies the create operation for an aggregated object by permissions from another side of an association even if this associated property is null (T689686)

                                    However, it returns this old issue: The Criteria Filter for ListViews which checks against null doesn't work correctly when an Object Permission and a Member Permission exist.


                                    Actual results

                                    One of BinaryOperator's operands is null.
                                    Parameter name: result.LeftOperand

                                       at DevExpress.Xpo.Helpers.UnknownCriteriaEleminatorBase.Visit(BinaryOperator theOperator)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.Visit(BinaryOperator theOperator)
                                       at DevExpress.Xpo.Helpers.StronglyTypedCriteriaVisitorBase`1.DevExpress.Data.Filtering.ICriteriaVisitor<T>.Visit(BinaryOperator theOperator)
                                       at DevExpress.Data.Filtering.BinaryOperator.Accept[T](ICriteriaVisitor`1 visitor)
                                       at DevExpress.Xpo.Helpers.UnknownCriteriaEleminatorBase.Process(CriteriaOperator operand)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.Expand(XPClassInfo[] upLevels, IPersistentValueExtractor persistentValuesSource, CriteriaOperator op, Int32 aliasDepthWatchDog, Boolean doDetectPostProcessing)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.Expand(XPClassInfo[] upLevels, IPersistentValueExtractor persistentValuesSource, CriteriaOperator op, Boolean doDetectPostProcessing)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.Expand(XPClassInfo ci, IPersistentValueExtractor persistentValuesSource, CriteriaOperator op, Boolean doDetectPostProcessing)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.Expand(IPersistentValueExtractor persistentValuesSource, XPClassInfo ci, CriteriaOperator op, Boolean doDetectPostProcessing)
                                       at DevExpress.Xpo.Helpers.PersistentCriterionExpander.ExpandToLogical(IPersistentValueExtractor persistentValuesSource, XPClassInfo ci, CriteriaOperator op, Boolean doDetectPostProcessing)
                                       at DevExpress.Xpo.Helpers.ObjectCollectionLoader.PrepareLoadObjects(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Helpers.ObjectCollectionLoader.LoadObjects(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.SimpleObjectLayer.LoadObjects(Session session, ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Session.GetObjectsInternal(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Session.<>c__DisplayClass108_0.<GetObjects>b__0()
                                       at DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler`1 handler, MessageHandler`1 createMessageHandler)
                                       at DevExpress.Xpo.Session.GetObjects(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.SessionObjectLayer.LoadObjects(Session session, ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Session.GetObjectsInternal(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Session.<>c__DisplayClass108_0.<GetObjects>b__0()
                                       at DevExpress.Xpo.Logger.LogManager.Log[T](String category, LogHandler`1 handler, MessageHandler`1 createMessageHandler)
                                       at DevExpress.Xpo.Session.GetObjects(ObjectsQuery[] queries)
                                       at DevExpress.Xpo.Session.GetObjects(ObjectsQuery query)
                                       at DevExpress.Xpo.XPBaseCollection.Load()
                                       at DevExpress.Xpo.XPBaseCollection.get_Objects()
                                       at DevExpress.Xpo.XPBaseCollection.get_Count()
                                       at DevExpress.ExpressApp.ProxyCollection.get_Count()
                                       at System.Windows.Forms.CurrencyManager.SetDataSource(Object dataSource)
                                       at System.Windows.Forms.CurrencyManager..ctor(Object dataSource)
                                       at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
                                       at System.Windows.Forms.BindingContext.get_Item(Object dataSource, String dataMember)
                                       at DevExpress.Data.CurrencyDataController.GetCurrencyManager()
                                       at DevExpress.Data.CurrencyDataController.OnDataSourceChanged()
                                       at DevExpress.Data.CurrencyDataController.SetDataSource(BindingContext context, Object dataSource, String dataMember)
                                       at DevExpress.XtraGrid.Views.Base.BaseView.SetDataSource(BindingContext context, Object dataSource, String dataMember)
                                       at DevExpress.XtraGrid.Views.Base.ColumnView.SetDataSource(BindingContext context, Object dataSource, String dataMember)
                                       at DevExpress.XtraGrid.Views.Grid.GridView.SetDataSource(BindingContext context, Object dataSource, String dataMember)
                                       at DevExpress.XtraGrid.GridControl.ActivateDataSource()
                                       at DevExpress.XtraGrid.GridControl.set_DataSource(Object value)
                                       at DevExpress.ExpressApp.Win.Editors.XafGridControlDataSourceAdapter.AssignDataSourceToGridControl(Object dataSource)
                                       at DevExpress.ExpressApp.Win.Editors.XafGridControlDataSourceAdapter.TryAssignDataSourceToGridControl()
                                       at DevExpress.ExpressApp.Win.Editors.XafGridControlDataSourceAdapter.grid_HandleCreated(Object sender, EventArgs e)
                                       at System.EventHandler.Invoke(Object sender, EventArgs e)
                                       at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
                                       at DevExpress.XtraEditors.Container.EditorContainer.OnHandleCreated(EventArgs e)
                                       at DevExpress.XtraGrid.GridControl.OnHandleCreated(EventArgs e)
                                       at System.Windows.Forms.Control.WmCreate(Message& m)
                                       at System.Windows.Forms.Control.WndProc(Message& m)
                                       at DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
                                       at DevExpress.XtraGrid.GridControl.WndProc(Message& m)
                                       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
                                       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
                                       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed:

                                • 18.2.4 :
                                • 18.1.8 :