I have 2 non-persistent objects which I need to merge, e.g.:
What are the pros and cons of the different ways to merge these objects? I see two options:
I will be merging a list of these objects, so if one method has drastically different performance to the others, that would be preferred.
The final merged object will be displayed on a page (Datagrid + AnyChart – essentially, one of the objects contains some chart data and the other object some metadata. I’d like the chart to ‘listen’ to the selection of the data grid, which will display metadata – hence the need to merge the objects)
So, essentially, these objects are not editable (by the end user) and this is the final thing that will happen to them (in terms of microflows)
I’d say the answer depends on what you want to do with the resulting object(s), what is the situation?
In any case, the first option results in less objects so that’s probably preferable, you can also delete/clear the object(s) you don’t need anymore