Mikro Orm v6 .raw 函数在 createQueryBuilder 中不存在

问题描述 投票:0回答:1

我在升级到 mikrOrm v6 时遇到问题,找不到任何有关如何升级的文档。我不断收到 qb.raw 在 createquerybuilder 上不存在的错误。 v6 有替代方案吗?这在 V4 中运行良好。

参考代码

        const qb = em.createQueryBuilder(Category);

        return qb
          .update({ score: qb.raw("score + 1") })
          .where({
            category: p.category.id,
            user: v.from.id,
            userCat: { $ne: null },
          })
          .execute();
node.js postgresql mikro-orm
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.