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

@@ -12,6 +12,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: EntityRepository::class)]
#[ApiFilter(SearchFilter::class, properties: ['jCard' => 'partial'])]
@@ -50,6 +51,7 @@ class Entity
*/
#[ORM\OneToMany(targetEntity: DomainEntity::class, mappedBy: 'entity', orphanRemoval: true)]
#[Groups(['entity:item'])]
#[SerializedName('domains')]
private Collection $domainEntities;
/**
@@ -57,6 +59,7 @@ class Entity
*/
#[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'entity')]
#[Groups(['entity:item'])]
#[SerializedName('nameservers')]
private Collection $nameserverEntities;
/**