views:

67

answers:

1

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
+1  A: 

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.

Pickels