Skip to content

replace retrieve by get_entity_by... methods

See, e.g., the underlying problem in https://gitlab.com/linkahead/linkahead-pylib/-/issues/123. We need to replace the Entity.retrieve method by the much more meaningful get_entity_by_name/get_entity_by_id methods.

Also, we should be very careful when retrieving entities with different roles. Maybe we should abandon Entity.retrieve and only allow it for the subclasses?


  • Reproduce bug + write test
  • Implement: I suggest not to use get_entity_by_id as id retrieval should be unique anyways, and large containers might take extremely long otherwise. Using get_entity_by_name if no ID is set should be sufficient to catch ambiguous retrieves.

Code-MR: !168 (closed)
Test-MR: caosdb-pyinttest!87 (merged)

Edited by I. Nüske
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information