Reputation: 65
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
Reputation: 18389
https://mikro-orm.io/docs/upgrading-v5-to-v6#raw-sql-fragments-now-require-raw-helper
Not sure what docs you were reading…
Upvotes: 1