Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not findById, deleteById of id injected documents #4353

Open
slimdo opened this issue Dec 13, 2021 · 0 comments
Open

Can not findById, deleteById of id injected documents #4353

slimdo opened this issue Dec 13, 2021 · 0 comments
Labels

Comments

@slimdo
Copy link

slimdo commented Dec 13, 2021

My get all method return as follow
[ { "code": "Server", "name": "Server", "status": "active", "createdAt": "2021-12-13T16:32:46.069Z", "updatedAt": "2021-12-13T16:32:46.069Z", "createdBy": { "appId": "service-management", "userId": "2d9ef30a-a9e5-4ba9-934d-b39cbbf8ebcc", "orgId": "" }, "id": "123543" } ]

Document on mongodb
image

I can not get this document by id
findById return
{ "error": { "statusCode": 404, "name": "Error", "message": "Unknown \"ServiceType\" id \"123543\".", "code": "MODEL_NOT_FOUND" } }
deleteById return
{ "count": 0 }

My Model.json for id injection as follow
image

Is something wrong with my code? Please give me a solution.

@slimdo slimdo added the bug label Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant