olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Grande (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OLINGO-1121) Can not create entities via to one navigation property
Date Mon, 08 May 2017 08:54:04 GMT

    [ https://issues.apache.org/jira/browse/OLINGO-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000452#comment-16000452
] 

Oliver Grande commented on 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)

Mime
View raw message