我更新了这个实体,添加了一些字段。
现在我想重新生成getter和setter,但是执行时php bin/console make:entity --regenerate App
没有结果;我的实体是listet,但它说“没有变化”。我尝试过使用 --overwrite 选项的事件。
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProfessionalRepository")
*/
class Professional
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="boolean")
*/
private $actiu;
/**
* @ORM\ManyToOne(targetEntity="Especialitat")
* @ORM\JoinColumn(referencedColumnName="id")
*/
private $especialitat;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getActiu(): ?bool
{
return $this->actiu;
}
public function setActiu(bool $actiu): self
{
$this->actiu = $actiu;
return $this;
}
}
我正在使用 symfony 4.3.8 在以前的版本中,我执行了 'php bin/console dictionary:genetrate:entities App',我不确定我是否可以在 symfony 4 中使用这个命令,无论如何它都不起作用.
我不知道还能尝试什么...