You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2014/12/16 21:41:13 UTC

[jira] [Resolved] (OLINGO-508) One-to-Many self-link causing NotImplementedException

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

Michael Bolz resolved OLINGO-508.
---------------------------------
    Resolution: Fixed

Fixed (and merged) with [this commit|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=fbfbff0889aeaacdca287211952c1c7f63a74387]

> One-to-Many self-link causing NotImplementedException
> -----------------------------------------------------
>
>                 Key: OLINGO-508
>                 URL: https://issues.apache.org/jira/browse/OLINGO-508
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-annotation, odata2-core
>    Affects Versions: V2 2.0.1
>            Reporter: Yaofeng Xu
>            Assignee: Michael Bolz
>
> An exception will be thrown when expanding an inline entity which is a one-to-many relationship to the entity itself.
> My entity model:
> @EdmEntityType
> @EdmEntitySet(name="Manufacturers")
> public class Manufacturer {
>        @EdmKey
>        @EdmProperty
>        private String id;
>        @EdmProperty
>        private String name;
>        @EdmProperty
>        private Calendar founded;
>        @EdmNavigationProperty
>        private List<Car> cars;
>        @EdmNavigationProperty
>        private List<Manufacturer> subManufacturers;
>        
> }
> Request:  http://localhost:8080/PqmODataExample/PqmODataExample.svc/Manufacturers('1')?$expand=SubManufacturers
> Response:
> {"error":{"code":null,"message":{"lang":"en","value":"Not implemented"}}}
> A workaround is to add toRole to the navigation property annotation as "@EdmNavigationProperty(toRole="r-manufacturers")".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)