[mongodb] 데이터 insert하는 방법. 한개 insertOne(), 여러개 insertMany()
document 데이터 insert 하는 방법 { key : value } object 형태로 document 데이터를 insert 한다. insertOne() 으로 한개 데이터 넣기 db.diary.insertOne({ "content" : "재미있는 오늘!", "userId" : 11, "weather" : "sunny", "writtenAt" : "2023-02-18T00:00:00.000Z", "deleted" : false}); insertMany()로 여러개의 데이터 넣기 [ {}, {}, ...] 배열로 데이터를 넣는다. db.diary.insertMany([ { "content" : "hello world", "userId" : 22, "weather" : "cloudy", "written..
database/mongodb
2023. 3. 4. 14:23
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Git
- JPA
- Kotlin
- dto 클래스 생성자
- Java
- 추상클래스
- Spring Security
- 스프링오류
- ?.let
- array
- spring boot 3
- FetchJoin
- ChatGPT
- QueryDSL
- Cannot construct instance of
- 문자열계산기
- insertMany
- checkout
- insertOne
- 배열
- addFilterBefore
- document insert
- Linux
- MultipleBagFetchException
- n+1
- port
- java.lang.NullPointerException: Parameter specified as non-null is null
- junit5
- MongoDB
- 장애 대응
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함