Skip to content

Commit

Permalink
4191 - Properly resolve outgoing hierarchy relations for node
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schmitt committed Oct 23, 2024
1 parent 301ee1f commit 9df5948
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public function findIngoingHierarchyRelationsForNode(
}

/**
* @return array<string, HierarchyRelation> indexed by the dimension space point hash: ['<dimensionSpacePointHash>' => HierarchyRelation, ...]
* @return array<int, HierarchyRelation>
*/
public function findOutgoingHierarchyRelationsForNode(
NodeRelationAnchorPoint $parentAnchorPoint,
Expand Down Expand Up @@ -461,7 +461,7 @@ public function findOutgoingHierarchyRelationsForNode(
}
$relations = [];
foreach ($rows as $row) {
$relations[(string)$row['dimensionspacepointhash']] = $this->mapRawDataToHierarchyRelation($row);
$relations[] = $this->mapRawDataToHierarchyRelation($row);
}
return $relations;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,17 @@ Feature: Remove NodeAggregate
And I expect node aggregate identifier "nodingers-cat" and node path "pet" to lead to node cs-identifier;nodingers-cat;{}
And I expect this node to have no references
And I expect node aggregate identifier "nodingers-kitten" and node path "pet/kitten" to lead to no node

Scenario: Remove a node aggregate with descendants and expect all of them to be gone
When the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | nodeTypeName | parentNodeAggregateId | nodeName |
| nody-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | child |
| younger-mc-nodeface | Neos.ContentRepository.Testing:Document | sir-david-nodenborough | younger-child |
When the command RemoveNodeAggregate is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| nodeVariantSelectionStrategy | "allVariants" |

Then I expect node aggregate identifier "sir-david-nodenborough" and node path "document" to lead to no node
And I expect node aggregate identifier "nody-mc-nodeface" and node path "document/child" to lead to no node
And I expect node aggregate identifier "younger-mc-nodeface" and node path "document/younger-child" to lead to no node

0 comments on commit 9df5948

Please sign in to comment.