As i understand here all data fetches from database and then deletes. As long as KeyValue entity have no relation with other entities I think it is possible to use HQL like "delete from KeyValue".