Home > database >  Want to modify the mongo feild type such as modified for NumberLong NumberInt
Want to modify the mongo feild type such as modified for NumberLong NumberInt

Time:09-26

RT:
Now find solutions
 
The db. The customer. The find ({}). ForEach (
The function (x) {
Var age=x.a ge;
Var longAge=NumberLong (age);
X.a ge=longAge;
The db. The customer. The save (x);
}
);

The poor efficiency, foreach again is not possible to save the data quantity is too big, we have encountered similar problems, how to solve?
  • Related