DB/MongoDB
몽고DB 17강. aggregate 배열 표현식
배열 전개 표현식 use("cosdb"); var persons1 = { _id: 1, username : "ssar", posts : [ {id:1, title:"제목1", content:"내용1"}, {id:2, title:"제목2", content:"내용2"}, {id:3, title:"제목3", content:"내용3"}, ] } var persons2 = { _id: 2, username : "cos", posts : [ {id:1, title:"제목1", content:"내용1"}, {id:2, title:"제목2", content:"내용2"}, {id:3, title:"제목3", content:"내용3"}, ] } db.persons.insertOne(persons1); db.persons...
2022. 5. 19. 15:52