diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index ba9ba3de1649710fd0a27ce0cec42507bc8472e5..08fcd0206b9df22902e80277d0e57b5f67c76db5 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -719,6 +719,14 @@ out: List[Entity] """ for parent in self.parents: + # TODO: + # Comment on _wrap and _wrapped_entity + # Currently, I (henrik) do not why the wrapping is necessary (and it is not + # documented). However, the following illustrates, why I think, it is a bad idea. + # First you add a parent with rec.add_parent(parent), but then you cannot access + # attributes of parent when you use rec.parents[0] for example becasue you do not get + # the same object but a wrapping object and you need to know that you only get the + # original by accessing the private (!) _wrapped_entity object. w_parent = parent._wrapped_entity if retrieve: parent.retrieve()