I have two entities
class Promotor
{
/**
* @ORM\\ManyToOne(targetEntity=\"Ciudad\", inversedBy=\"promotor\")
* @ORM\\JoinColumn(name=\"ciudad_id\", referenced
The onDelete="CASCADE" is used on the database level. As you already said there is no onUpdate. Another downside is that ON DELETE CASCADE only works on InnoDB. It doesn't work on MyISAM.
But you can use Doctrine in-memory cascade operations:
class Promotor
{
/**
* @ORM\ManyToOne(targetEntity="Ciudad", inversedBy="promotor", cascade={"persist", "remove"})
* @ORM\JoinColumn(name="ciudad_id", referencedColumnName="id", nullable=false)
*/
protected $ciudad;
It's all described in the documentation: http://docs.doctrine-project.org/en/latest/reference/working-with-associations.html#transitive-persistence-cascade-operations
Plus you can skip the JoinColumn annotation, because the way you have it written, is the default configuration and it's generated implicitly.
So you can just write:
class Promotor
{
/**
* @ORM\ManyToOne(targetEntity="Ciudad", inversedBy="promotor", cascade={"persist", "remove"})
*/
protected $ciudad;