How to use OnUpdate = Cascade in Doctrine 2

1

/**
 * @ORM\ManyToOne(targetEntity="JN\Entity\Planos\Plano")
 * @ORM\JoinColumn(name="plano_id", referencedColumnName="id", nullable=true, onDelete="SET NULL", onUpdate="CASCADE")
 **/
private $plano;

Thank you

    
asked by anonymous 22.02.2015 / 23:10

1 answer

1

Unfortunately, there is no support for OnUpdate , another thing worth noting is that OnDelete only works on InnoDB if you are using MyISAM it will not work for MySQL.

What you can do is to use cascade in memory, although there is a performance caveat in this technique.

The cascade options are all documented here: link

    
23.02.2015 / 00:45