Closed IsakNaslundBh closed 1 year ago
@BHoMBot check compliance
@BHoMBot check compliance
@BHoMBot check unit-tests
@BHoMBot check unit-tests
@BHoMBot check unit-tests
@BHoMBot check unit-tests
@BHoMBot check compliance @BHoMBot check required
@BHoMBot check core @BHoMBot check versioning
@BHoMBot check versioning
@BHoMBot check serialisation @BHoMBot check null-handling
@BHoMBot check serialisation @BHoMBot check null-handling
@BHoMBot check serialisation @BHoMBot check null-handling
@BHoMBot check ready-to-merge
@BHoMBot check ready-to-merge
Issues addressed by this PR
Closes #126
Finally fixing this old issue of better handling merging of properties on "same" object being pushed in, most common case being highlighted in the issue (Node with and without constraints).
Done by instead of call to Distinct, a call to GroupBy is made, after CopyBHoMProperties and any CopyPropertiesModules is called, making sure all relevant properties are merged over.
Also, update to how the ID assignment from any duplicate objects is made, as simply can rely on the group, rather then trying to re-fetch from the list based on another call with the comparer. This should be a bit more efficient than previous implementation.
Test files
Have added new PushTest doing exactly what is highlighted in the issue. Was failing before, but working after changes.
Also, added a new test to check that all pushed objects have ids assigned. Was working before as well, but wanted to add this additional case as I made some changes to how it was handled.
Changelog
Additional comments