Open kitsunet opened 2 weeks ago
Do not merge yet, probably want to refactor some of the code in the DTOs. I think we should make the "collection of references for one reference property" an explicit DTO, as the code like this feels a bit too messy for my taste...
On the upside the somewhat weird and unfinished reference snapshots can be removed with this.
And forgot to adapt legacy migration tests (which rely on specific event payloads, see below, before I adjust those we should decide which way to go with b/c)...
oh and I should mention that at the moment this is not forgiving to the existing events. We could do this in the respective fromArray constructors of the DTOs and just "upcast" from the old structure on the fly without much problem, or add a migration for the events.
I think this would be much nicer code wise (obviously duplicated for Serialized...), bit annoying to use 3 objects for this, but I think it will make the code much better to reason with and empty is then really just the new "middle DTO" with createEmpty()
This reworks references so that multiple reference properties can be set via a single command and also references can be attached to
CreateNodeAggregateWithNode
which is also used for copying nodes.The serialization format is adapted to allow multiple reference properties, which also affects all behat tests with references.
A behat test to show reference copies work was added.