D
D
dilshod_developer2016-04-12 12:19:29
Yii
dilshod_developer, 2016-04-12 12:19:29

How to delete linked model data?

Good afternoon.
There are three models User, AdressBook, UserRoles
User and AdressBook has a one-to-one relationship.
User and UserRoles have a many-to-many relationship.
How can UserRoles and AdressBook data be removed when deleting a User?
I am using yii2 and for related data I am using e96 RelationalBehavior.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2016-04-12
@kawabanga

Create FK correctly, with a delete trigger.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question