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

Chandan V.A commented on OLINGO-44:
-----------------------------------

Hi Georgi,

The issue is fixed and the index.jsp page for reference scenario is also 
enhanced with 

SalesOrders?$expand=SalesOrderLineItemDetails
SalesOrders(2L)?$expand=SalesOrderLineItemDetails
SalesOrders?$expand=SalesOrderLineItemDetails/MaterialDetails,SalesOrderLineItemDetails/MaterialDetails/StoreDetails,NotesDetails
SalesOrders(2L)?$expand=SalesOrderLineItemDetails/MaterialDetails,SalesOrderLineItemDetails/MaterialDetails/StoreDetails,NotesDetails

I am closing the ticket for now, please reopen in case the issue re-occurs.

Regards
Chandan

> $expand doesn't work for several projections of a child navigation property
> ---------------------------------------------------------------------------
>
>                 Key: OLINGO-44
>                 URL: https://issues.apache.org/jira/browse/OLINGO-44
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 1.0.0, V2 1.1.0
>            Reporter: Georgi
>            Assignee: Chandan V.A
>            Priority: Critical
>             Fix For: V2 1.1.0
>
>
> Consider the following JPA model with one-to-many CMRs:
> X(1) -> (N) A (1) -> (N) B (1) -> (N) C
> X(1) -> (N) A (1) -> (N) D (1) -> (N) E
> To get the complete model for X inline, I use $expand:
> /X(1)/$expand=A/B/C,A/D/E
> However, this yields a NullPointerException in JpaExpandCallback:108
> Debugging the code shows that the reason is that the data constructed for 
> response is missing anything but one of the paths provided in the $expand 
> list.
> I think that the reason is the algorithm of parse2EdmNavigationValueMap, 
> which takes as input a valid navigationPropertyList, but fails to produce and 
> adequate navigation properties map for this case. That is probably due to the 
> matching navigation property names (ADetails), which effectively overwrites 
> previous entries. That leaves the system in an inconsistent state and we end 
> up with the NPE in JpaExpandCallback.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to