You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When commiting or reloading values with model wrapper the order of the updates is non-deterministic due to the internal usage of HashSet to manage the fields.
In some cases this is problematic.
Example:
in our project we use the ModelWrapper to map a list and based on the elements of that list a StringProperty. When the StringProperty changes, its value has to be applied to all list elements.
When an element is added to the list and the StringProperty is changed it sometimes happens that the string property is applied to the old list items only because the StringPeroperty change is applied first, Subsequent list changes override the StringProperty change.
The solution would be to have more control over the change order. I suggest the use of a LinkedHashSet. It also has the ability to ignore/detect duplicates but it also garantees a special iteration order.
The text was updated successfully, but these errors were encountered:
When commiting or reloading values with model wrapper the order of the updates is non-deterministic due to the internal usage of HashSet to manage the fields.
In some cases this is problematic.
Example:
in our project we use the ModelWrapper to map a list and based on the elements of that list a StringProperty. When the StringProperty changes, its value has to be applied to all list elements.
When an element is added to the list and the StringProperty is changed it sometimes happens that the string property is applied to the old list items only because the StringPeroperty change is applied first, Subsequent list changes override the StringProperty change.
The solution would be to have more control over the change order. I suggest the use of a LinkedHashSet. It also has the ability to ignore/detect duplicates but it also garantees a special iteration order.
The text was updated successfully, but these errors were encountered: