BHoM / BHoM_Adapter

GNU Lesser General Public License v3.0
7 stars 5 forks source link

Add ability to set if identical objects should be sent to be updated or not in the full CRUD #324

Closed IsakNaslundBh closed 1 year ago

IsakNaslundBh commented 1 year ago

Description:

Discussed with @alelom , would be useful to have a feature that could check if the objects to be updated are fully identical to something already existing in the model, and if so, do not push it.

This will require some additional settings on the adapter as well as another set of EqualityComparers (defaulting to be using the HashComparer) with the distinction between the two being:

AdapterComparers used to define if two objects are semantically the same in the software. For example, Material with same name, case with same number and node in same position etc. IdentityComparers (new proposed) to define if the objects are identical on all relevant parts. This could default to the HashComparerthat checks all properties of the object.

Also should update the AdapterSettings to add control over if this feature should be enabled or not.

For some software packages this could mean a big deal in not having to go in and re-set already existing items in the model!