zfcampus / zf-apigility

BSD 3-Clause "New" or "Revised" License
258 stars 52 forks source link

disable 422 No entity identifier present following entity creation #59

Closed ghost closed 10 years ago

ghost commented 10 years ago

please disable the code: /vendor/zfcampus/zf-hal/src/Plugin/Hal.php

/ if (!$id) { return new ApiProblem( 422, 'No entity identifier present following entity creation.' ); } /

jguittard commented 10 years ago

Why would it need to be disabled ?

Entity identifier, which is the primary key of the table/document in the data persistence layer, is returned upon object creation. This verification makes sure object is effectively created before generating HAL links, who need this key.

If you don’t want HAL links to be generated, just disable HAL/JSON renderers for your API.

Le 17 juil. 2014 à 15:17, mediawest notifications@github.com a écrit :

please disable the code: /vendor/zfcampus/zf-hal/src/Plugin/Hal.php

/ if (!$id) { return new ApiProblem( 422, 'No entity identifier present following entity creation.' ); } /

— Reply to this email directly or view it on GitHub.

weierophinney commented 10 years ago

@mediawest That change was actually made yesterday, and released with zf-hal 1.0.2. If you do a composer update, you should see the new code in place.