Open jonaslenz opened 2 months ago
The main problem here lies in the attributes holding other object instances. We can easily compare attributes that are string or numbers but for other object instances it is necessary to have all of the classes to have the eq method manualy defined with appropriate cascading of the instances comparison within the ProjectManager.eq method.
So by excluding the object instance holding attributes we can easily get match on project that differs substantially in its attribute structure. And to achieve valid comparison I need to implement eq to basicly all object classes there are in project_management.py and all their subclasses.
Hi Honza, would it be possible to compare instances of the Project Manager? - e.g. if the state loaded from DB equals the local one?
I found this stackexchange solution for it: https://stackoverflow.com/questions/1227121/compare-object-instances-for-equality-by-their-attributes
and tried to add this to the PorjectManager class:
but it fails.
I further tested with more informative output, which attributes are not equal: