250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- linux
- javascript
- MongoDB
- docker
- python
- error
- fastapi
- RDS
- AWS EC2
- Jenkins
- 500
- macbook
- React
- springboot
- deploy
- EC2
- js
- github
- Troubleshooting
- Express
- webhook
- TypeScript
- AWS
- Spring
- axios
- Github Actions
- nodejs
- ngrok
- Java
- MUI
Archives
- Today
- Total
728x90
반응형
SMALL
목록motor (1)
BEAT A SHOTGUN
[MongoDB] transaction
시작질문과 답변을 등록하는 데에 다양한 방법이 있지만,가끔여러 이유로 답변 데이터를 생성하면서 답변 데이터에 질문id를 포함하고, 동시에 질문 데이터에 답변id도 추가하도록 하고 싶을 때가 있다.그래서insert_answer_result = await mongodb.answer.insert_one({ "question_id": question_id, **answer_data ... })update_question_result = await mongodb.question.update_on( {"question_id": question_id}, {"$addToSet": {"answers": answer_id}})이렇게 할 때가 ..
LEARNING
2024. 7. 10. 00:22
728x90
반응형
LIST