Reputation: 167
Iam using Sonata Admin. Have a House
and Room
entitys with one to many relation. Iam use the CollectionType
field for relation.
If i check delete
, when edit a list of rooms and press Save
- it set null relation field house_id
in room
table, but record still not delete.
How to fix this? Thx.
Upvotes: 0
Views: 543
Reputation: 522
Give to Relation field
Cascade ={"remove"}, orphanRemoval=true
Upvotes: 2