added method to delete all objects of an entity in core data