1
在我的控制,我想在我的實體更改兩個值(僅適用於指數「3):Symfony的不更新日期字段
$cle->getVersions()[0]->getLots()[3]->setTantieme(97);
$cle->getVersions()[0]->getLots()[3]->setDateSuppression(new \DateTime);
dump($cle);
$em->flush();
但是,只有‘Tantieme’值改變我不。不懂在我的實體,我有:
/**
* @var string
*
* @ORM\Column(name="date_suppression", type="datetime", nullable=true)
*/
protected $date_suppression;
public function setDateSuppression($date_suppression)
{
$this->date_suppression = $date_suppression;
}
public function getDateSuppression()
{
return $this->date_supppression;
}
這是一個特點它與其他實體的偉大工程,刷新之前
轉儲結果中庸之道:。 Image
Tantieme不斷更新,但絕不date_suppression ...
謝謝,但不工作太:/ –