Skip to content

Commit

Permalink
Fix visual entity update
Browse files Browse the repository at this point in the history
Use aggregatedEntity instead of rawEntity, #773.
  • Loading branch information
skodapetr committed Nov 8, 2024
1 parent 99caf3c commit c338629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions applications/conceptual-model-editor/src/visualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ function onChangeVisualEntities(
if (next !== null) {
// New or changed entity entity.
if (isVisualNode(next)) {
const entity = entities[next.representedEntity]?.rawEntity ?? null;
const entity = entities[next.representedEntity]?.aggregatedEntity ?? null;

if (!isSemanticModelClass(entity) && !isSemanticModelClassUsage(entity)) {
console.error("In visual update semantic entity is not class or class usage.", { entity, visual: next });
Expand All @@ -941,7 +941,7 @@ function onChangeVisualEntities(
}

} else if (isVisualRelationship(next)) {
const entity = entities[next.representedRelationship]?.rawEntity ?? null;
const entity = entities[next.representedRelationship]?.aggregatedEntity ?? null;

const isRelationship =
isSemanticModelRelationship(entity) ||
Expand Down Expand Up @@ -974,7 +974,7 @@ function onChangeVisualEntities(
}

} else if (isVisualProfileRelationship(next)) {
const entity = entities[next.entity]?.rawEntity ?? null;
const entity = entities[next.entity]?.aggregatedEntity ?? null;

if (!isSemanticModelClassUsage(entity)) {
console.error("In visual update semantic entity is not a profile.", { entity, visual: next });
Expand Down

0 comments on commit c338629

Please sign in to comment.