Several operations inside of a single MongoDB query
문제
Is it possible to alter more than one collection in a single query with MongoDB?
A SQL example:
begin
update table_1 set some_field=1;
update table_2 set a_different_field=2;
commit
해결책
I think you need to use db.eval for something like that. With db.eval you can execute javascript on the server.
You can find more info about it at the mongoDB website.
제휴하지 않습니다 StackOverflow