Skip to content

Commit a6d2419

Browse files
TASK: adjust handling of node property of type refernce
1 parent 6a7b3eb commit a6d2419

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Classes/Driver/Version6/Mapping/NodeTypeMappingBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ public function buildMappingInformation(ContentRepositoryId $contentRepositoryId
7373

7474
$propertiesAndReferences = array_merge(
7575
$nodeType->getProperties(),
76-
array_map(function ($reference) {
77-
$reference['type'] = 'references';
76+
array_map(static function (array $reference): array {
77+
$reference['type'] = (($reference['constraints']['maxItems'] ?? null) === 1)
78+
? 'reference'
79+
: 'references';
7880
return $reference;
7981
}, $nodeType->getReferences())
8082
);

0 commit comments

Comments
 (0)