Currently the id of a Property, Section or a Document (and their children) remains the same if the object is cloned.
- Since these ids should be used only once in a Document, by default the id of the clone and all potentially cloned children should be set to new UUIDs.
- The id attribute has to be excluded in the
baseobject.__eq__() method.
- The clone method should also contain a
keep_id flag which by default is False. If set to True, the old id value is kept e.g. when attaching the exact same odML object to another Document.
- An additional validation check needs to prohibit the saving of a Document containing odML objects with identical ids.
- Currently ids of an odML entity cannot be set or changed after they have been created. Add a method
new_id() to assign a new UUID to an odML entity analogous to the UUID assignment in the odML Entity __init__.
Currently the
idof a Property, Section or a Document (and their children) remains the same if the object is cloned.baseobject.__eq__()method.keep_idflag which by default isFalse. If set toTrue, the old id value is kept e.g. when attaching the exact same odML object to another Document.new_id()to assign a new UUID to an odML entity analogous to the UUID assignment in the odML Entity__init__.