I have a record in my database like this:
collection name: studentModels
{
id:ObjectId("59008080165ce7345ee51e29"),
"jobid":"59007cd5ece6e72f49cc910c"
}
When I use api of loopback like this
It returns
- name: "Error",
- status: 404,
- message: "Unknown "studentModels" id "undefined".",
- statusCode: 404,
- code: "MODEL_NOT_FOUND",
- stack: "Error: Unknown "studentModels" id "undefined". at Function.convertNullToNotFoundError ..........
And when I use the same api for searching id or any other property ex:
I am getting the correct record from the database.
My schema is like this
"jobid": {
"type": "string"
}
and id is generated by mongodb.
Please help me this to solve my problem.