Georgi created OLINGO-44:
----------------------------

             Summary: $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: 1.0.0, 1.1.0
            Reporter: Georgi


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