fix: entity handle can be an empty string

This commit is contained in:
Maël Gangloff
2024-07-21 02:25:37 +02:00
parent 17a1cc2938
commit 63f8dc168d
5 changed files with 24 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: NameserverRepository::class)]
#[ApiResource(
@@ -49,6 +50,7 @@ class Nameserver
*/
#[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'nameserver', cascade: ['persist'], orphanRemoval: true)]
#[Groups(['nameserver:item', 'domain:item'])]
#[SerializedName('entities')]
private Collection $nameserverEntities;
/**