objectql内核增加updateMany,updateOne函数,原函数update保持不变
Created by: yinlianghui
因该任务:把所属单位表 company 从 organizations 中独立出来 #124 (closed),要批量更新组织用用户信息,所以需要updateMany相关功能。
let result = await this.getObject("organizations").updateMany([
["_id", "=", company.organization],
"or",
["parents", "=", company.organization]
], {
company_id: this.record_id
}, this.userSession);
- 返回值为受影响行数,我不做任务返回值处理,直接返回的同mongo/meteorMongo等驱动返回的结果
- typeorm相关驱动,因实现updateMany有困难,所以暂时未实现