jaystack / jaydata

Notice: this library isn't maintained anymore
http://jaydata.org
GNU General Public License v2.0
352 stars 95 forks source link

Cannot update key fields using odata #224

Open phil-mitchell opened 9 years ago

phil-mitchell commented 9 years ago

When using odata, it is impossible to update a key field. The URL is constructed based on the current values in the entity, so if one of the key fields has changed, the MERGE request will result in a 404 Not Found error.

The odata server is nice enough to include a URI in the metadata of the entity. Why not use that instead of reconstructing the URL every time?

phil-mitchell commented 9 years ago

Yes, updating key fields is disallowed by odata, but 404 is not the right error message, and it should really be left to the provider to determine what to do.