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 ab03675 commit 922563aCopy full SHA for 922563a
src/Util/ClassSourceManipulator.php
@@ -287,6 +287,8 @@ private function addSingularRelation(BaseRelation $relation)
287
$typeHint,
288
// make the type-hint nullable always for ManyToOne to allow the owning
289
// side to be set to null, which is needed for orphanRemoval
290
+ // (specifically: when you set the inverse side, the generated
291
+ // code will *also* set the owning side to null - so it needs to be allowed)
292
// e.g. $userAvatarPhoto->setUser(null);
293
$relation instanceof RelationOneToOne ? $relation->isNullable() : true
294
);
0 commit comments