Skip to content
Snippets Groups Projects
Commit ab379939 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

DOC: clarified that the compare_entities function does not work for abstract properties

parent 945e08a5
No related branches found
No related tags found
2 merge requests!107ENH: add entity getters and cached functions,!103Improving the compare_entities functions
......@@ -195,7 +195,8 @@ def getCommitIn(folder):
return t.readline().strip()
def compare_entities(old_entity: Entity, new_entity: Entity, compare_referenced_records: bool = False):
def compare_entities(old_entity: Entity, new_entity: Entity,
compare_referenced_records: bool = False):
"""Compare two entites.
Return a tuple of dictionaries, the first index belongs to additional information for old
......@@ -207,7 +208,7 @@ def compare_entities(old_entity: Entity, new_entity: Entity, compare_referenced_
- Each property lists either an additional property or a property with a changed:
- datatype
- importance or
- value (not implemented yet)
- value
In case of changed information the value listed under the respective key shows the
value that is stored in the respective entity.
......@@ -217,6 +218,9 @@ def compare_entities(old_entity: Entity, new_entity: Entity, compare_referenced_
`compare_referenced_records = False` to prevent infinite recursion in case
of circular references).
NOTE: This function does not work for abstract properties! I.e. it is not possible
to directly compare two entities that are of class db.Property.
Parameters
----------
old_entity, new_entity : Entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment