[참고자료] What is the "__v" field in Mongoose I'm using Mongoose version 3 with MongoDB version 2.2. I've noticed a __v field has started appearing in my MongoDB documents. Is it something to do with versioning? How is it used? stackoverflow.com Mongoose v6.5.4: Schemas If you haven't yet done so, please take a minute to read the quickstart to get an idea of how Mongoose works. If you are migrating..
[상황] 래포지토리를 클론받아서, package.json 에 있는 모듈들을 npm install 명령어로 모두 세팅해놓으려고 했는데 bcrpyt 모듈 설치에서 실패가 일어났습니다. $ npm i bcrypt npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient...
[참고자료] $in — MongoDB Manual Docs Home → MongoDB Manual $inThe $in operator selects the documents where the value of a field equals any value in the specified array. To specify an $in expression, use the following prototype:{ field: { $in: [ , , ... ] } }For comparison of different www.mongodb.com $exists — MongoDB Manual Docs Home → MongoDB Manual $existsSyntax: { field: { $exists: } }When is tr..
설치되더라도 vscode prettier 확장프로그램을 설치해도 바로 적용이 안되는 경우가 있습니다. 참고자료의 도움으로 prettier 적용을 하게 됐습니다. cmd(⌘) + , 단축키를 누르면 설정(Preference)에 들어갈 수 있습니다. 1. editor format on save 검색 후 체크박스 체크표시 (fomat on save 도 마찬가지로, '사용자'탭과 '작업영역'탭에 적용시켜주세요~) 2. json 검색 후, Edit in setting.json 에서 수정합니다. 3. default formatter 을 검색 후에 esbenp.prettier-vscode 를 선택하시면 됩니다. 참고로 작업하고 있는 프로젝트 에서 적용하고 싶다면, 검색창 바로 밑에 있는 '작업영역' 탭을 선택해주세..
객체안에 메소드 정의할 때는 mongoose모듈을 불러와서 mongoose.methods 로 했습니다. mongoose의 Schema 내부 타입스크립트 코드를 한번 뜯어보니까 method 도 있다는걸 알게됐습니다. mongoose.method 와 mongoose.methods 의 용도와 의미가 무엇인지 알아보기로 했습니다. (1) mongoose.method 소스를 깠을 때는 의미는 다음과 같습니다. Adds an instance method to documents constructed from Models compiled from this schema. 이 스키마에서 컴파일된 모델로 작성된 문서에 인스턴스 메서드를 추가 합니다. (2) mongoose.methods Object of currently ..
[참고자료] [mongodb] mongo 콘솔에서 ObjectId로 객체를 어떻게 검색합니까? - 리뷰나라 이 질문에 C # 및 Perl에 대한 답변이 있지만 기본 인터페이스에는 해당되지 않습니다. 나는 이것이 효과가 있다고 생각했다. db.theColl.find( { _id: ObjectId("4ecbe7f9e8c1c9092c000027") } ) 쿼리에서 결과가 반 daplus.net find(_id: "아이디값") 형식으로 하니까 검색결과에 아무것도 안뜹니다. 자세히 확인해보니 몽고디비의 콜렉션안의 데이터의 구분자인 _id컬럼의 타입은 ObjectId 객체 입니다. _id 를 기준으로 데이터를 검색할 때는 아래와 같이 하면 됩니다. find({ _id: ObjectId("") })
- Total
- Today
- Yesterday
- jest
- TDD
- node.js
- git
- 바이트디그리
- Mongoose
- vscode
- 스마트폰중독
- gem
- MongoDB
- MySQL
- IT용어
- RDBMS
- 참고
- 클린아키텍쳐
- Jekyll
- nestjs jest
- 나도 할 수 있다
- nestjs
- 습관개선
- 디지털디톡스
- 개발용어
- 한달독서
- OS
- Nest.js
- TypeScript
- 한달어스
- 미완
- 갓생살자
- typeORM
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |