1.Exception while invoking method 'Express.methods.updateThirdPlatform' Error: After filtering out keys not in the schema, your modifier is now empty
這個(gè)錯(cuò)誤的原因是傳入的字段在數(shù)據(jù)庫表結(jié)構(gòu)中沒有定義澄者,通常文件中會(huì)有2所列的數(shù)據(jù),在報(bào)錯(cuò)無法定位的時(shí)候,可以使用斷點(diǎn)查找原因峦剔。個(gè)人遇到的問題是在GuestOrder的表中沒有定義thirdExpressInfo字段银萍。
2.const updateGuestOrderResult = db.GuestOrder.update({
_id: guestOrderId,
}, {
$set: {
'thirdExpressInfo.remak': remak
},
});
這是數(shù)據(jù)庫更新內(nèi)容的操作络凿,第一個(gè){}是篩選條件憨攒,第二個(gè){}是要更新修改的內(nèi)容觉既,$set是meteor數(shù)據(jù)庫的關(guān)鍵字惧盹,不能省,set后面的{}寫需要修改的具體內(nèi)容瞪讼。語句也可以在數(shù)據(jù)庫查找超級(jí)時(shí)使用钧椰,update一次只能更新一條數(shù)據(jù)。
3.Exception while invoking method 'common.methods.sfTe' ReferenceError: OrTre is not defined
報(bào)錯(cuò)是該方法沒有定義符欠,一般發(fā)生在需要引入的文件中嫡霞,通過一層層的層級(jí)關(guān)系查找。