You can clone with
No one assigned
Right now, Twins library does not handle entity collections in any way, and the goal of this ticket is to add first-class support for collections.
Twins can only:
While some supported controls (TreeView) can accept a collection of items, the collection is basically treated like an atomic value, and each item does not become an entity.
This has been an acceptable workaround for single-level trees, but won't work when syncing view models, where each item is an entity of its own, and has to participate in further subentity syncing.
We want an update like this:
"name": "compile sass",
to sync the list of ActionGroups, Actions, Rules and RuleFiles inside the view model.
Entity syncing should be performed when we reach a property of ObservableCollection type. This property will always be treated as read-only, and the returned collection will be manipulated instead of being overwritten.
We want to create an EntityCollection class to track the list of subentities inside the entity.
It's safe to assume that every model class that we want to sync this way has to provide a string Id property, and we probably want to define a C# interface for that.
We'll need to know which C# class to create when new entities are added; for that, we can probably provide some reasonable default logic (based on the generic type of the ObservableCollection), overridable using an optional interface implemented by the parent entity.
twins: Collection support, handle ObservableCollection
Actually, still need to actually sync the children (right now they are simply overwritten), so reopening.