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

Patch requests problem #180

Open
aggelos24 opened this issue Oct 23, 2018 · 1 comment
Open

Patch requests problem #180

aggelos24 opened this issue Oct 23, 2018 · 1 comment

Comments

@aggelos24
Copy link

I am using json-api, GET and POST requests have no problem. Every time, I tried PATCH requests, the response was 500 Internal Error. It took long time to figure out what was wrong. What I finally discovered, was that the problem was in schema declaration where I set { versionKey: false }, everything works fine without it.
I dont know if this behavior is considered normal. Even if it is, it has to be mentioned somewhere in the documentation.

@ethanresnick
Copy link
Owner

I dont know if this behavior is considered normal. Even if it is, it has to be mentioned somewhere in the documentation.

Yeah, it would make sense to document this. Basically, versionKey: true is required in the schema because the MongooseAdapter uses (and updates) the version key as a form of optimistic concurrency control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants