I cannot get onDelete to work in Doctrine2 (using YAML Mapping).
I tried this relation in the Product class:
oneToOne: category: targetEntity: Category onDelete: CASCADE
But that does not work.
EDIT:
I installed ON DELETE: CASCADE manually in the database
imported YAML mapping with doctrine:mapping:import ,
empty database
updated it from the schema using doctrine:schema:update and did not get ON DELETE in the foreign key .. so even Doctrine does not know how to do it lol ..
tamir source share