FriendsOfSymfony / FOSMessageBundle

User-to-user messaging bundle for Symfony
356 stars 183 forks source link

How remove user? #307

Closed 7tomas7 closed 5 years ago

7tomas7 commented 7 years ago

Hi. I'm so tired, because I cant remove user which has created some threads or messages. I use FOSUserBundle too. Cannot delete or update a parent row: a foreign key constraint ... Please help me

hex333ham commented 5 years ago

old issue, but for those who read this:

you need to cascade the removal or unassign the user from messages they are in within your query