Hi Dan,

There is a discussion in https://review.openstack.org/#/c/58199/ talking about 
the change detection in objects.
If an object A contains another object or object list (called sub-object), any 
change happened in the sub-object can't be detected by obj_what_changed() in 
object A.

A generic method might be to change make_class_properties() to add it into 
_changed_fields() for object A, even though any properties in the sub-object 
are changed.
So save() in object A can get the correct obj_get_changes() before updating the 
db.

However, in save() in instance.py (line 450), we found a set of special 
_save_%s() would be called to update those objects always, no matter whether 
they are changed or not.
I am going to do the more generic way above. May I? What do you think on that?

Thanks.
--
Shane

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to