You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ramana (JIRA)" <ji...@apache.org> on 2015/12/15 08:07:46 UTC

[jira] [Commented] (OLINGO-414) Cannot Filter on Navigation Property

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

Ramana commented on OLINGO-414:
-------------------------------

Hi Team,
Can we have an update on this issue please.
Currently, i could notice oling Odata v2, does not allow to implement $filter, $orderby for expanded entities.
Odata syntax shows correct approach.But olingo does not recognize.


I would like to know if Olingo Odata v2 supports $filter and $ orderyby or not for expanded entites ?


Tested URL:

<URL Path >/EdocumentDetails?$orderby=EdocMainDetails/CreatedAt desc&$expand=EdocMainDetails

<URL Path >/EdocumentDetails?$filter=EdocMainDetails/CreatedAt%20 eq ‘SUBMITTED’&$expand=EdocMainDetails

It throw’s error as  “OData- JPA query syntax is not correct”. 

Could please provide inputs on this.


> 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: Chandan V.A
>         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)