<?phpnamespace App\Entity;use App\Entity\Interfaces\AddressInterface;use App\Repository\PointOfSaleAddressRepository;use App\Traits\AddressTrait;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation as Serializer;/** * @ORM\Entity(repositoryClass=PointOfSaleAddressRepository::class) * * @Serializer\ExclusionPolicy("ALL") */class PointOfSaleAddress implements AddressInterface{ use AddressTrait; public function __clone() { if($this->id) { $this->setId(NULL); } }}