Current filter:
                                You should refresh the page.
                                0
                                  • We receive a ArgumentNullException when we try to load an object into a nested unit of work. We found that it is caused by a null (loaded) delayed property on the original object (before loading it into the the nested unit of work).

                                    Steps to Reproduce:

                                    Run test app. You'll receive a ArgumentNullException when the GetNestedObject method is call.

                                    Actual Results:

                                    System.ArgumentNullException was unhandled

                                      Message="Value cannot be null.\r\nParameter name: theObject"

                                      Source="DevExpress.Xpo.v8.2"

                                      ParamName="theObject"

                                      StackTrace:

                                           at DevExpress.Xpo.Metadata.XPDictionary.GetClassInfo(Object theObject)

                                           at DevExpress.Xpo.Session.IsNewObject(Object theObject)

                                           at DevExpress.Xpo.Helpers.NestedLoader.CloneData(Object source, Object destination)

                                           at DevExpress.Xpo.Helpers.NestedLoader.CloneObjects(IList& toFireLoaded)

                                           at DevExpress.Xpo.Helpers.NestedLoader.GetNestedObjects(ICollection[] parentObjects)

                                           at DevExpress.Xpo.Helpers.NestedLoader.GetNestedObject(Object parentObject)

                                           at DevExpress.Xpo.NestedUnitOfWork.GetNestedObject(Object obj)

                                           at DevExpress.Xpo.NestedUnitOfWork.GetNestedObject[T](T obj)

                                           at TestGetNestedObjectBug.Program.Main(String[] args) in C:\AATemp\Tests\TestGetNestedObjectBug\Program.cs:line 35

                                           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

                                           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

                                           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

                                           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

                                           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

                                           at System.Threading.ThreadHelper.ThreadStart()

                                    Expected Results:

                                    No exception in this scenario and that the object is loaded into the nested unit of work.

                                TestGetNestedObjectBug.zip
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.