We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have two entities with the same entity_id: ex:
POST http://<host>:<port>/v2/entities Fiware-Service: happy_path Fiware-ServicePath: /test {"type":"room_1", "id": "room_10", "my_attr": "34"}
POST http://<host>:<port>/v2/entities Fiware-Service: happy_path Fiware-ServicePath: /test {"type":"room_2", "id": "room_10", "attr_test": "45"}
And try to update an entity by ID
POST http://<host>:<port>/v2/entities/room_10 Fiware-Service: happy_path Fiware-ServicePath: /test {"new_attr": "14"}
Both entities are updated: ex in mongo:
{ "_id" : { "id" : "room_10", "type" : "room_1", "servicePath" : "/test" }, "attrNames" : [ "my_attr", "new_attr" ], "attrs" : { "my_attr" : { "type" : "", "creDate" : 1441095072, "modDate" : 1441095072, "value" : "34" }, "new_attr" : { "value" : "14", "type" : "", "creDate" : 1441095097, "modDate" : 1441095097 } }, "creDate" : 1441095072, "modDate" : 1441095097 }
{ "_id" : { "id" : "room_10", "type" : "room_2", "servicePath" : "/test" }, "attrNames" : [ "attr_test", "new_attr" ], "attrs" : { "attr_test" : { "type" : "", "creDate" : 1441095085, "modDate" : 1441095085, "value" : "45" }, "new_attr" : { "value" : "14", "type" : "", "creDate" : 1441095097, "modDate" : 1441095097 } }, "creDate" : 1441095085, "modDate" : 1441095097 }
In this case the response expected: Status: 409 Conflict
{ error: "TooManyResults" description: "There is more than one entity with that id. Refine your query." }
The text was updated successfully, but these errors were encountered:
Due to mongoBackend implications, @fgalan could be the best candidate for assigning this.
Sorry, something went wrong.
Fixed in PR #1240. @iariasleon please hava a look and close the issue if you find it solved.
LGTM
{"error":"TooManyResults","description":"There is more than one entity that match the update. Please refine your query."}
iariasleon
No branches or pull requests
We have two entities with the same entity_id:
ex:
And try to update an entity by ID
Both entities are updated:
ex in mongo:
In this case the response expected:
Status: 409 Conflict
The text was updated successfully, but these errors were encountered: