Is there an existing issue for this?
Problem Statement
When creating subclasses in the ontology, it's great that the attributes are inherited and can be added in the mappings.
Relationships don't get the same functionality - if there are relationships defined on the parent class, data cannot be mapped to the relationship for the subclass and no relationships are created in the knowledge graph for the subclass.
Proposed Solution
Either:
- Create an explicit mapping for relationships for the subclass when a parent has a defined relationship.
This could result in a combination explosion for mappings, especially for self-referencing relationships.
- Load a relationship for the subclass based on the mapping from the parent class.
This would require resolving which subclass the mapping should be applied to when loading.
Area
Mapping (Manual / SparkSQL)
Additional Context
It's possible to assign a mapping for both the parent and subclass entities, and their id's don't have to be the same. This leads to some modeling considerations that might influence how inherited relationships can work:
- If the knowledge graph loads entities at parent and subclass levels and the id's are the same, should both instances be loaded into separate entities or merged together at the subclass level?
- Should the modeler define a relationship between the parent and subclass to inform they are the same, or should the equality of the instances be inferred?
- If equality is inferred, can the query endpoints and AI chat functionality deduce the equality at execution time from the ontology, or would it be better to materialize these equality relationships using inference rules?
Is there an existing issue for this?
Problem Statement
When creating subclasses in the ontology, it's great that the attributes are inherited and can be added in the mappings.
Relationships don't get the same functionality - if there are relationships defined on the parent class, data cannot be mapped to the relationship for the subclass and no relationships are created in the knowledge graph for the subclass.
Proposed Solution
Either:
This could result in a combination explosion for mappings, especially for self-referencing relationships.
This would require resolving which subclass the mapping should be applied to when loading.
Area
Mapping (Manual / SparkSQL)
Additional Context
It's possible to assign a mapping for both the parent and subclass entities, and their id's don't have to be the same. This leads to some modeling considerations that might influence how inherited relationships can work: