You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Oliver Grande (JIRA)" <ji...@apache.org> on 2017/05/08 15:48:04 UTC

[jira] [Reopened] (OLINGO-1121) Can not create entities via to one navigation property

     [ https://issues.apache.org/jira/browse/OLINGO-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Grande reopened OLINGO-1121:
-----------------------------------

Hello Christian,
thanks for the hint. 
Reading the Atom specification I'm convinced that you should allow a POST on a To One relation. Section 9.2 states:
"To add members to a Collection, clients send POST requests to the URI of the Collection."
And that exactly what I want to do. The target of the To One association is a collection (either way, as you know, any entity is in V2 a collection).
I you look at the example of 2.2.3.5 Resource Path: Semantics at section URI6 what I like to do is creating a new SalesOrder and together with this a new Customer so my URIs would look like:
POST .../SalesOders('id 123')
POST .../SalesOders('id 123')/OrderedBy

> Can not create entities via to one navigation property
> ------------------------------------------------------
>
>                 Key: OLINGO-1121
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1121
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.8
>            Reporter: Oliver Grande
>            Assignee: Christian Amend
>
> I try to create three entities via a $batch request with three POSTs. One "top-level" entity and two related ones. One of the navigation properties is a "To One" and the other one is a "To Many" relation.
> Whereas the "Top Level" and the "To Many" are processed without any problem, the To One aborts with an  ODataMethodNotAllowedException. 
> Some debugging showed that the "To Many" gets UriType URI6B, where as "To One" gets UriType URI6A. Later in ODataRequestHandler. validateUriMethod POST is forbidden for URI6A.
> Please enable POST for URI6A  as well.
> Regards,
> Oliver



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)