public <T> void delete(T bean) throws StorageException {
        EntityManager entityManager = getActiveEntityManager();
        try {
            //entityManager.merge(bean);
            entityManager.remove(bean);
        } catch (Throwable t) {
            LOGGER.error(t.getMessage(), t);
            throw new StorageException(t);
        }
    }
Delete using bean

@param bean the bean to delete
@throws StorageException if a storage problem occurs while storing a bean
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/AbstractJpaStorage.java