Symfony don';更新日期字段

Symfony don';更新日期字段,symfony,doctrine-orm,doctrine,Symfony,Doctrine Orm,Doctrine,在控制器中,我希望更改实体中的两个值(仅针对索引“3”): 但是,只有“Tantieme”值被更改。我不明白。在我的实体中,我有: /** * @var string * * @ORM\Column(name="date_suppression", type="datetime", nullable=true) */ protected $date_suppression; public function setDateSuppression($date_suppression)

在控制器中,我希望更改实体中的两个值(仅针对索引“3”):

但是,只有“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;
}
这是一种特质。它对其他实体非常有效

刷新前转储结果:

Tantieme总是更新的,但是date\u suppression从不…

尝试在
setDateSuppression()方法中返回“something”:

public function setDateSuppression($date_suppression)
{
     $this->date_suppression = $date_suppression;

     return $this;
}
编辑:

试一试:

$cle->getVersions()[0]->getLots()[3]->setDateSuppression(new \DateTime());
尝试在
setDateSuppression()方法中返回“something”:

public function setDateSuppression($date_suppression)
{
     $this->date_suppression = $date_suppression;

     return $this;
}
编辑:

试一试:

$cle->getVersions()[0]->getLots()[3]->setDateSuppression(new \DateTime());