Skip to content

Commit 922563a

Browse files
committed
clarifying note
1 parent ab03675 commit 922563a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Util/ClassSourceManipulator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ private function addSingularRelation(BaseRelation $relation)
287287
$typeHint,
288288
// make the type-hint nullable always for ManyToOne to allow the owning
289289
// 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)
290292
// e.g. $userAvatarPhoto->setUser(null);
291293
$relation instanceof RelationOneToOne ? $relation->isNullable() : true
292294
);

0 commit comments

Comments
 (0)