public function delete() { $this->getUser()->getPhotos()->flush(); foreach ($this->getAlbums() as $album) { $album->getPhotos()->flush(); } foreach ($this->getLikers() as $liker) { $liker->getLikedPhotos()->flush(); } return parent::delete(); }
public function delete() { $this->getPhoto()->getComments()->flush(); return parent::delete(); }