는이 같은 하나의 간단한 모델 루프백 API가 :루프백 3.0 : 필터의 REST API에서 결과를 반환하지 않는 경우
{
"name": "Establishment",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"Distance": {
"type": "number"
},
"EstablishmentId": {
"type": "number"
},
"EstablishmentType": {
"type": "string"
},
"Location": {
"type": "string"
},
"MinCost": {
"type": "number"
},
"Name": {
"type": "string"
},
"Stars": {
"type": "number"
},
"UserRating": {
"type": "number"
},
"UserRatingTitle": {
"type": "string"
},
"UserRatingCount": {
"type": "number"
},
"ImageUrl": {
"type": "string"
},
"ThumbnailUrl": {
"type": "string"
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": {}
}
간단한 전화 http://localhost:3000/api/Establishments
로 돌아갑니다 모든 결과, 예상대로를; http://localhost:3000/api/Establishments?filter[where][distance][gt]=30
을 호출하면 결과가 전혀 나오지 않습니다. 빈 배열입니다.
Establishment
s가 많이 있고 Distance
이 30보다 큽니다. 실제로 다른 속성에서 where
필터를 사용하면 빈 배열이됩니다. 나는 무엇을 놓칠 수 있 었는가?
어쩌면 그 대소 문자를 구분 시도는 첫 글자를 소문자하거나 사용하는 모델에 필드 이름을 변경하기 때문에 "거리 "귀하의 필터 –