See test in caosdb-pyinttest https://gitlab.indiscale.com/caosdb/src/caosdb-pyinttest/-/blob/06205692534c32de76e0acf1fe5c9cfa643137d7/tests/test_parents.py