OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: Function Import questions

Hi Mark,


Question 1: yes, that should be possible:


resourcePath = …

             / entityFunctionImportCall       [ singleNavigation ]


singleNavigation = …

                   [ "/" propertyPath

                   / …



Question 2: yes, if you prefix the unqualified function import with $root/


http://services.odata.org/TripPinRESTierService/(S(2yexst3navg3ksybtvafe0ux))/People?$filter=LastName eq $root/GetPersonWithMostFriends()/LastName


Which is not implemented by the TripPin service.





From: odata@lists.oasis-open.org [mailto:odata@lists.oasis-open.org] On Behalf Of Mark Biamonte
Sent: Freitag, 13. Oktober 2017 00:36
To: odata@lists.oasis-open.org
Subject: [odata] Function Import questions


I am trying to come up with an example of using a function import in a $filter _expression_.  I am not having much luck using the TripPin Service.


I can execute the function import query




and it returns the Person Russel Whyte


Then I try to execute the same function import and navigate to the LastName property of the Person returned



This returns a 500 response with the message “The page cannot be displayed because an internal server error has occurred.”


Question 1:  Should I be able to navigate to a property of an Entity returned by the function import?


Finally I try using the function import in a $filter _expression_


http://services.odata.org/TripPinRESTierService/(S(2yexst3navg3ksybtvafe0ux))/People?$filter=LastName eq Microsoft.OData.Service.Sample.TrippinInMemory.Models.GetPersonWithMostFriends()/LastName


This also returns a 500 response with the message “An error has occurred”.  I suspect this query may be failing for the same reason as the previous query.  I realize this is a contrived query since I can get the desired result by calling the function import directly.


Question 2: Should I be able to use a function import in the $filter _expression_ as in the above query?




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]