You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($this->propertyMetadataFactory->create($resourceClass, $property)->isIdentifier() ?? false) {
56
56
$identifiers[] = $property;
57
57
}
58
58
}
59
59
60
60
if (!$identifiers) {
61
+
if (\in_array('id', iterator_to_array($properties), true)) {
62
+
return ['id'];
63
+
}
64
+
61
65
thrownewRuntimeException(sprintf('No identifier defined "%s". You should add #[\ApiPlatform\Core\Annotation\ApiProperty(identifier: true)]" on the property identifying the resource."', $resourceClass));
62
66
}
63
67
@@ -71,14 +75,14 @@ public function getIdentifiersFromItem($item): array
0 commit comments