We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f116d64 commit 1c1f379Copy full SHA for 1c1f379
src/Listener/JsonApiListener.php
@@ -643,7 +643,7 @@ protected function _fetchRelated(Subject $subject): void
643
$association = $fromRepository->getAssociation($relationName);
644
$associationType = $association->type();
645
$reverseAssociationTypes = [
646
- Association::ONE_TO_ONE => [Association::ONE_TO_MANY], // hasOne -> belongsTo
+ Association::ONE_TO_ONE => [Association::MANY_TO_ONE], // hasOne -> belongsTo
647
Association::MANY_TO_ONE => [Association::ONE_TO_ONE, Association::ONE_TO_MANY], // belongsTo -> hasOne or hasMany
648
Association::ONE_TO_MANY => [Association::MANY_TO_ONE], // hasMany -> belongsTo
649
Association::MANY_TO_MANY => [Association::MANY_TO_MANY],
0 commit comments