Allow to unset the group of a user

Fetch EAGER seems to be buggy here, so fetch the group lazily
This commit is contained in:
Jan Böhmer 2022-10-09 21:50:56 +02:00
parent e83f14f1ee
commit 0b83d0a0b0

View file

@ -149,7 +149,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/**
* @var Group|null the group this user belongs to
* @ORM\ManyToOne(targetEntity="Group", inversedBy="users", fetch="EAGER")
* DO NOT PUT A fetch eager here! Otherwise you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions.
* @ORM\ManyToOne(targetEntity="Group", inversedBy="users")
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* @Selectable()
*/