-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphMerge loses child objects #3481
Labels
Comments
russblair
added a commit
to russblair/csla
that referenced
this issue
Oct 5, 2023
russblair
added a commit
to russblair/csla
that referenced
this issue
Oct 5, 2023
rockfordlhotka
added a commit
that referenced
this issue
Oct 5, 2023
#3481 Fixed IdentityManage.GetNextIdentity method
This was referenced Oct 5, 2023
Closed
rockfordlhotka
added a commit
that referenced
this issue
Oct 5, 2023
#3481 Fix GraphMerge issue with losing child objects
russblair
added a commit
to russblair/csla
that referenced
this issue
Dec 20, 2023
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I discovered a strange bug where the last row of an ECL disappears after calling SaveAsync. I discovered this in CSLA 7 using Blazor however I suspect it affects CSLA 6 as well.
This strange occurrence is caused by a GraphMerge failure following a successful save. This puts the object in an invalid state and cannot be used without risk of corrupting data in the database. We have added logic to detect this scenario during the save and in some cases, have to navigate the user away from the page so the object can be reloaded.
I showed the issue to Andrew (The Cake Monster) and my co-worker Will. Andrew showed me that the Graph Merge unit test were failing and Will confirmed that the bug is in CLSA and not the unit tests.
Due to the nature of the symptoms, I suspect that the bug was introduced when the MobileFormatter was switched to the new binary serializer.
The bug appears to be that the deserialization process assigns different values to the objects in the object graph then were in the original. I think this is because the binary serializer restores the original identity value so there is no need to recalculate them. I suspect the old serializer didn’t preserve the identity value.
I initially tried removing line 31 from IdentityManager.cs which helped but still some unit tests were failing. Will was able to provide additional code changes to get the unit tests to pass.
Scenarios and problems we found in the GraphMerge unit tests are:
Assuming the introduction of the MobileFormatter was the cause, we are uncertain whether fixing the above scenarios is the correct action to take or whether changing the MobileFormatter to behave in the same way the previous Formatter did, with respect to identity & parents, makes more sense.
The text was updated successfully, but these errors were encountered: