[
https://issues.apache.org/jira/browse/OLINGO-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269511#comment-14269511
]
Christian Holzer commented on OLINGO-511:
-----------------------------------------
I resolved a bug in ODataReferenceAddingRequest and added a method to the
CUD-Factory to change single value navigation property references.
As an alternative, you may be able to use a binding in a normal update request,
which addresses the entity. More information can be found in OData Version 4.0
Part 1: Protocol Plus Errata 02 chapter 11.4.6.3.
> Add a class ODataReferenceUpdatingRequest for reference with cardinality 1
> --------------------------------------------------------------------------
>
> Key: OLINGO-511
> URL: https://issues.apache.org/jira/browse/OLINGO-511
> Project: Olingo
> Issue Type: Bug
> Components: odata4-client
> Affects Versions: V4 4.0.0-beta-01
> Environment: java version : "1.7.0_72"
> Odata v4 service :
> http://services.odata.org/V4/OData/(S(li4s4wcplcgyiy3uvuog1lxl))/OData.svc
> Reporter: Thierry Templier
> Attachments: Olingo511.diff
>
>
> In this case of a reference property with cadinality 1, the
> ODataReferenceAddingRequest can't be used since it uses an HTTP method POST:
> Here is the simplified content of the request:
> POST
> /V4/OData/(S(li4s4wcplcgyiy3uvuog1lxl))/OData.svc/Products(1)/Supplier/$ref
> and the simplified content of the response:
> HTTP/1.1 405 Method Not Allowed
> {
> "error":
> { "code":"", "message":"The URI (...) is not valid for POST operation. For
> POST operations, the URI must refer to a service operation or an entity set."
> }
> }
> We should have an ODataReferenceUpdatingReference that does the same thing
> than an ODataReferenceAddingReference but with an HTTP method PUT.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)