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

Michael Bolz commented on OLINGO-414:
-------------------------------------

Hi [~Santosh Kumar] and [~jpenninkhof],

I checked the proposed solution and it works for _to one navigation_:
http://localhost:8080/SalesOrderProcessing.svc/Customers?$filter=parent/name%20eq%20%27Bob%20Bryan%27&$format=json&odata-debug=json

However it does not work for _to many navigation_:
http://localhost:8080/SalesOrderProcessing.svc/Customers?$filter=id%20eq%20100%20and%20orders/currencyCode%20eq%20%27USD%27&odata-debug=json

Nevertheless it is an improvement to the actual state and I have created the 
[OLINGO-JPA-Fixes|https://git1-us-west.apache.org/repos/asf?p=olingo-odata2.git;a=shortlog;h=refs/heads/OLINGO-JPA-Fixes]
 branch and pushed the fix.

I will try to improve the _to many navigation_ but after the {{2.0.7}} release 
I will bring this fix already on the master (so that it will be included in the 
next release).

Best Regards, Michael

> Cannot Filter on Navigation Property
> ------------------------------------
>
>                 Key: OLINGO-414
>                 URL: https://issues.apache.org/jira/browse/OLINGO-414
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.0
>            Reporter: Simon Carroll
>            Assignee: Michael Bolz
>         Attachments: olingo-414-exception.diff, olingo-414-patch.diff
>
>
> We are receiving an error when we try to filter on a navigation property.  In 
> our solution we have a Notification entity and a User entity, we would like 
> to retrieve a specific Notification but only if it is linked to the 
> requesting user.  This would involve an ODATA request which filters on both 
> the UserId and the NotificationId.  An example of the URL we are invoking is:
> dspplatform.svc/Notifications?$filter=NotificationId%20eq%204%20and%20UserDetails/UserId%20eq%202
> This returns the following error:
> org.apache.olingo.odata2.core.edm.provider.EdmNavigationPropertyImplProv 
> cannot be cast to org.apache.olingo.odata2.api.edm.EdmProperty
> Can you please advise on how to perform filters on a Navigation property as 
> we need this as part of our core functionality?



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

Reply via email to