
db 필드를 넣을 때 잘못 넣어서 필드 이름을 바꾸고 싶은데요
rank_give -> rank 이런식으로요
몽고db에서 제공하는 문서에선 $rename 연산자를 사용하라고 되어있는데, 그냥 예시를 붙여넣으니 빨간줄이 떠서 조금씩 변경하다 이렇게 됐습니다.
db.cars.updateMany( {}, {'$rename': { "rank_give": "rank", "image_give": "image","model_give": "model","sales_give": "sales" } } )
하면 다음과 같은 에러가 뜹니다
TypeError: 'Collection' object is not callable. If you meant to call the 'updateMany' method on a 'Collection' object it is failing because no such method exists.
파이몽고에 맞게 변형하면 어떻게 해야할까요?ㅠ
