Open aggelos24 opened 6 years ago
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.
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.