sonata-project/SonataMediaBundle — pull request #579 by benglass (2014-06-17 21:05:41+00:00)
Title: Allow deletion of media that are associated with galleries.

Right now the way the mapping is set up there is no cascade of deletes from the Media to the GalleryHasMedia. This means that if you attempt to delete Media and there are still GalleryHasMedia entities pointing at it you get a foreign key error.

Closes #576

Cascade removal from Media to GalleryHasMedia.