Currently, when loading a term all its ancestors are loaded recursively with all their attributes. This is quite inefficient, especially for vocabularies with deep hierarchies. In addition, it may bring issues if a term appears in the hierarchy as well as in one of the SKOS mapping properties (skos:related etc.) - JOPA refuses to load such term because it is designed not to allow working with the same individual as instance of two distinct classes in the same persistence context.
The proposal is to rework the way term hierarchy is represented by providing access only to the term's direct parent. This information would be sufficient to navigate the term hierarchy, and the same representation can be used for SKOS mapping and hierarchical property values.
Currently, when loading a term all its ancestors are loaded recursively with all their attributes. This is quite inefficient, especially for vocabularies with deep hierarchies. In addition, it may bring issues if a term appears in the hierarchy as well as in one of the SKOS mapping properties (
skos:relatedetc.) - JOPA refuses to load such term because it is designed not to allow working with the same individual as instance of two distinct classes in the same persistence context.The proposal is to rework the way term hierarchy is represented by providing access only to the term's direct parent. This information would be sufficient to navigate the term hierarchy, and the same representation can be used for SKOS mapping and hierarchical property values.