Skip to content

Commit

Permalink
fix: Create link *Value property if it is not present on current class (
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone authored Aug 30, 2024
1 parent 12d5250 commit 61e65b8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1178,13 +1178,18 @@ final case class OntologyResponderV2(
}

allBaseClassIris = internalClassIri +: allBaseClassIrisWithoutInternal
existingLinkPropsToKeep: Set[SmartIri] =
existingReadClassInfo.entityInfoContent.directCardinalities.keySet
.flatMap(p => cacheData.ontologies(p.getOntologyFromEntity).properties.get(p))
.filter(_.isLinkProp)
.map(_.entityInfoContent.propertyIri)

cardinalityCheckResult <- OntologyHelpers
.checkCardinalitiesBeforeAddingAndIfNecessaryAddLinkValueProperties(
internalClassDef = newInternalClassDef,
allBaseClassIris = allBaseClassIris.toSet,
cacheData = cacheData,
existingLinkPropsToKeep = existingReadClassInfo.linkProperties,
existingLinkPropsToKeep = existingLinkPropsToKeep,
)
.toZIO
(newInternalClassDefWithLinkValueProps, cardinalitiesForClassWithInheritance) = cardinalityCheckResult
Expand Down

0 comments on commit 61e65b8

Please sign in to comment.