I want to do something like this, but the this
keyword doesn't seem to be set inside the update statement.
db.items.update({foo:…}, {$set: {bar: this.foo}}, false, true)
Do I have to use eval
to accomplish this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…