fdor
fdor

Reputation: 167

How to full delete in Sonata Admin (one to many relation)

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

Answers (1)

Ravi Damasiya
Ravi Damasiya

Reputation: 522

Give to Relation field

Cascade ={"remove"}, orphanRemoval=true 

Upvotes: 2

Related Questions