Fix hierarchy of CommonDataEntity #113
Labels
breaking change
This may break integration of the library for some consumers
refactor
This may involve a refactor
While working on fixing #109, I noticed that there is no dedicated interface for immutable data.
For example, for Contacts the hierarchy is as follows,
The
MutableContact
does NOT extend the immutableContact
. This allows a concrete distinction between mutable and immutable contacts. Consumers can do the following;However, for data, the hierarchy is as follows,
The
MutableCommonDataEntity
extendsCommonDataEntity
. We have no reliable way to know if a reference to aCommonDataEntity
is actually immutable! This is prone to bugs such as #109 🤦This needs to be fixed 🔥 🔥🔥🔥🔥🔥
The text was updated successfully, but these errors were encountered: