Dale
Dale

Reputation: 65

Mikro Orm v6 .raw function doesnt exist in createQueryBuilder

I am having an issue with the upgrade to mikrOrm v6 and cannot find any documentation on what I can do to upgrade. I keep getting an error for qb.raw doesnt exist on createquerybuilder. Is there an alternative in v6? This was working fine in V4.

refrence Code

        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();

Upvotes: 1

Views: 234

Answers (1)

Related Questions