Bug #44184

Request arguments are not merged correctly for single object actions

Added by Bastian Waidelich about 8 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
MVC
Start date:
2012-12-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Following szenario:

I try to update a single entity via PUT:

curl -i -H "Accept: application/xml" -H "Content-Type: application/xml" -X POST -d "<root><product><title>changed title</title></product></root>" http://localhost/products/2a7a6fd9-fa6f-47e2-8976-7c8308a96e4c

This won't merge the changed product title correctly, because in Router::route() the request & routing arguments are merged via Arrays::arrayMergeRecursiveOverrule(). the routing array with array('product' => array('title' => 'changed title')) is then overridden by array('product' => '<the product UUID>'));

This works, when using the "object routes" (IdentityRoutePart) because that returns an array in the form array('__identity' => '<UUID>') which can be merged.

#1

Updated by Karsten Dambekalns over 7 years ago

  • Target version changed from 2.0 to 2.0.1

Also available in: Atom PDF