Skip to content

`get_parents_recursively` doesn't return indirect parents of retrieved/inserted entities.

Created by: Florian Spreckelsen

Possibly a server bug rather than pylib? This breaks has_parent for indirect parents too, of course.

When using local, i.e., non-inserted entities everything is fine (as in test_recursive_parents.py):

>>> A = RecordType(name="A")
>>> B = RecordType(name="B").add_parent(A)
>>> B2 = RecordType(name="B2").add_parent(A)
>>> C = RecordType(name="C").add_parent(B).add_parent(B2)
>>> C.get_parents_recursively()
<ParentList>
  <Parent name="B"/>
  <Parent name="A"/>
  <Parent name="B2"/>
</ParentList>

However, after insertion the indirect parent A is missing:

>>> A.insert()
>>> B.insert()
>>> B2.insert()
>>> C.insert()
>>> C.get_parents_recursively()
<ParentList>
  <Parent id="107" name="B"/>
  <Parent id="108" name="B2"/>
</ParentList>

Imported comments:

By Timm Fitschen on 2021-02-10T12:15:38.334Z

confirmed, tests in caosdb-pyinttest!37 (merged)

By Florian Spreckelsen on 2020-07-23T13:31:21.356Z

mentioned in merge request caosdb-pyinttest!37 (merged)

By Florian Spreckelsen on 2020-07-23T12:42:29.734Z

marked this issue as related to caosdb-pyinttest#12 (closed)

By Florian Spreckelsen on 2020-07-23T12:41:55.017Z

mentioned in issue caosdb-pyinttest#12 (closed)

By Florian Spreckelsen on 2020-07-23T12:31:55.075Z

changed the description

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information