Skip to content

Can not findById, deleteById of id injected documents #4353

Description

@slimdo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions