-
Notifications
You must be signed in to change notification settings - Fork 3
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
OrderedItemList is not properly cloned. Assembler preserves the state… #59
Conversation
… of OrderedItemList.
@IevhenIkonnykov do you propose we refactor the cloning of the OrderedItemList so that keys are preserved? |
I've done some looking at the code, and indeed, the clone method of for instance
the |
I also think that adding a clone method to OrderedItemList and regeneration of existing code is a better solution. |
I don't think we do any special handling in the IME. We just do a clone, add that to the Operation/Transation and that's it. It seems that what is happening now is that we are sending new keys to the server every single time we update a Thing that has a property of |
80ef644
to
705d485
Compare
@@ -0,0 +1,41 @@ | |||
using CDP4Common.EngineeringModelData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing header
@@ -0,0 +1,41 @@ | |||
using CDP4Common.EngineeringModelData; | |||
using NUnit.Framework; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using statements go inside namespace
… of OrderedItemList.
Prerequisites
Description
It looks like Assembler preserves keys of OrderedItemLists properly, but once an OrderedItemList is cloned then a clone gets absolutely new keys that are not synchronized with the original object. Two tests are added to prove this. An example of where OrderedItemList is cloned here. It is clear that it adds new items and for each new item a new key is generted. That is why keys are not synchronized.