private void truncateEntity(T bean) {
        // deletes every key in the MDR at the moment
        // can't iterate and delete in one go for concurrency reasons
        Set<TKey<?, ?>> keysToDelete = new LinkedHashSet<>();
        keysToDelete.addAll(bean.getAvailableKeys());
        while (!(keysToDelete.isEmpty())) {
            TKey<?, ?> key = keysToDelete.iterator().next();
            bean.deleteValues(key);
            keysToDelete.remove(key);
        }
    }