Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 7c0dc22

Browse files
Merge pull request #33 from ungdev/fix/issue-32-constraint-violation
🐛 (Issue) fixed issue 32
2 parents 41355aa + 20c7583 commit 7c0dc22

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class User implements UserInterface
276276
/**
277277
* The relation to the Addresses of the User.
278278
*
279-
* @ORM\OneToMany(targetEntity=UserAddress::class, mappedBy="user", cascade={"persist", "remove"})
279+
* @ORM\OneToMany(targetEntity=UserAddress::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
280280
*
281281
* @Assert\Valid()
282282
*/

src/Repository/UserAdressRepository.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
namespace App\Repository;
44

5-
use App\Entity\UserAdress;
5+
use App\Entity\UserAddress;
66
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
77
use Doctrine\Persistence\ManagerRegistry;
88

99
/**
10-
* @method null|UserAdress find($id, $lockMode = null, $lockVersion = null)
11-
* @method null|UserAdress findOneBy(array $criteria, array $orderBy = null)
12-
* @method UserAdress[] findAll()
13-
* @method UserAdress[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
10+
* @method null|UserAddress find($id, $lockMode = null, $lockVersion = null)
11+
* @method null|UserAddress findOneBy(array $criteria, array $orderBy = null)
12+
* @method UserAddress[] findAll()
13+
* @method UserAddress[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
1414
*/
1515
class UserAdressRepository extends ServiceEntityRepository
1616
{
1717
public function __construct(ManagerRegistry $registry)
1818
{
19-
parent::__construct($registry, UserAdress::class);
19+
parent::__construct($registry, UserAddress::class);
2020
}
2121

2222
// /**

0 commit comments

Comments
 (0)