aiondemand / aiondemand/AIOD-rest-api

Add all back-relationships.

Abierto
#128 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement priority
Lenguaje dominante
Python
Estrellas
36
Forks
77
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

- Setting `Organisation.members` should result in `Person.member_of` being filled for the corresponding person
- `Dataset.funder` -> `Person.funded_dataset` / `Organisation.funded_dataset`
- ...
Same principle holds for many relations.

**Relationships between non-abstract classes**
For some relationships, this is rather straight-forward. As long as both entities are not abstract (e.g. Organisation and Person), you can easily create the relationship.

**Relationships from/to an abstract class**
It's more difficult when one of the classes is abstract (e.g. Dataset.funder -> Agent.funded_dataset). In this case, we create the back-relationship on `AgentTable`. But then, the back-relation will not be visible on `Organisation`, because `Organisation` is an `Agent`, which has a one-to-one relationship to `AgentTable` (here, the `AgentTable` is serialized to an identifier). We need to make sure that `Organisation.agent_table.funded_dataset` is serialized to `Organisation.funded_dataset`. This is already solved for `is_part_of` -> `has_part`, and `relevant_resource` -> `relevant_to`. See `ResourceTable` and `AbstractAIResource`. Notably: `deserialized_path="ai_resource_identifier",`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.