fix the relationships between folder and mediaObject

Deletion with dependence works now