mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
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:
parent
e83f14f1ee
commit
0b83d0a0b0
1 changed files with 2 additions and 1 deletions
|
@ -149,7 +149,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Group|null the group this user belongs to
|
* @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")
|
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
|
||||||
* @Selectable()
|
* @Selectable()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue