Skip to content

Commit 0f99bf9

Browse files
bastien70jmsche
authored andcommitted
Added cascade remove to databases user
1 parent deaa4b5 commit 0f99bf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, \String
3535

3636
private ?string $plainPassword = null;
3737

38-
#[ORM\OneToMany(mappedBy: 'owner', targetEntity: Database::class, orphanRemoval: true)]
38+
#[ORM\OneToMany(mappedBy: 'owner', targetEntity: Database::class, cascade: ['remove'], orphanRemoval: true)]
3939
private Collection $databases;
4040

4141
public function __construct()

0 commit comments

Comments
 (0)