I am working with Doctrine 2.4.2, Symfony 2.4 and SQLite 3.8.3.
I have two entities defined:
Category:
type: entity
id:
id:
type: integer
id: true
generator:
strategy: AUTO
oneToMany:
ministries:
targetEntity: Ministry
cascade: [persist]
mappedBy: category
And
Ministry:
type: entity
id:
id:
type: integer
id: true
generator:
strategy: AUTO
manyToOne:
category:
targetEntity: Category
inversedBy: ministries
joinColumn:
name: category_id
nullable: false
onDelete: CASCADE
But when I delete a category, the ministry entities do not get deleted, although the constraint should cascade. What am I missing?
Do I have to configure anything to get that working?