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
- bytebuddyinterceptor
- exprectedbelow
- 백준 2667 java
- baekjoon
- coding test
- baekjoon 4963
- baekjoon 2667
- 단지 번호붙이기
- baekjoon1012
- BFS
- CodingTest
- beakjoon11725
- 백준 섬의갯수
- beakjoon
- beakjoon 1697
- 백준 현수막
- spring boot
- backjoon 16173
- baekjoon 2468
- dfs
- attvalue
- springboot
- baekjoon 14714
- baekjoon 3187
- baekjoon 16953
- websecurityconfiguration
- Error
- java.lang.nosuchmethoderror
- html error
- 안전영역 java
Archives
- Today
- Total
NOT FOUND
Mongoose find method is not working 본문
async findByCategoryCode(category: string, page: number, size: number) {
console.log(category);
const test = await this.model.find({categoryCode: "C-1"}).explain().exec();
console.log(test);
const test2 = await this.model.aggregate([
{
$match: {
categoryCode: "C-2"
}
}
]).exec();
console.log(test2);
return this.model.find({'$categoryCode': "C-1"}).skip((page - 1) * size).limit(size).exec();
}
const test = await this.model.find({categoryCode: "C-1"}).explain().exec();
const test2 = await this.model.aggregate([
{
$match: {
categoryCode: "C-2"
}
}
]).exec();
explain으ㄹ 사용해서 쿼리를 봤더니 filter에 아무것도 들어있지 않았다.
데이터베이스에 code값이 없었다.
'db' 카테고리의 다른 글
| csv 파일 maria db에 업로드 시 \n이 제대로 출력이 안됨 (0) | 2024.01.29 |
|---|