You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importknexUtilsfrom'@smpx/knex-utils';import{Model}from'xorm';constknex=knexUtils.getKnex();Model.knex(knex);classCategoryextendsModel{async$afterUpdate(opts,queryContext){console.log('update');// this is runawaitsuper.$afterUpdate(opts,queryContext);}}asyncfunctiontest(){console.log(awaitCategory.query().where('id',999999).update({slug: 'abc'}));// prints 0, no rows were updated}test().catch((err)=>{console.error(err);});
The text was updated successfully, but these errors were encountered:
Working example:
The text was updated successfully, but these errors were encountered: