@Override
    public long execute() {
        JPQLSerializer serializer = new JPQLSerializer(templates, entityManager);
        serializer.serializeForUpdate(queryMixin.getMetadata(), updates);

        Query query = entityManager.createQuery(serializer.toString());
        if (lockMode != null) {
            query.setLockMode(lockMode);
        }
        JPAUtil.setConstants(query, serializer.getConstants(), queryMixin.getMetadata().getParams());
        return query.executeUpdate();
    }
UpdateClause implementation for JPA

@author tiwe
querydsl-jpa/src/main/java/com/querydsl/jpa/impl/JPAUpdateClause.java