-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clarification] Semantics & handling of duplicate query options values #2004
Comments
First, 5.1 System Query Options states that
We could, and probably should repeat that statement for nested query options in 5.1.3 System Query Option $expand states that
This rules out example 3 above. 5.1.4 System Query Option $select does not exclude specifying a selected property more than once because it doesn't harm to say "I want this" more than once. It does explicitly exclude duplicate or conflicting nested options:
11.2.6.2 System Query Option $orderby states that
This means that specifying a property more than once does not have an effect on the outcome because it would sort items with the same value of the expression, and servers can just drop repeated expressions. 5.1.10 System Query Option $compute states that
Which includes names of other computed dynamic properties. Does this (with the addition of #2008) answer your question? |
Hello @ralfhandl Yes it does, thank you very much ! Thanks again for the quick and clear response. |
Hi @falbert-ptc, Please don't apologize, we are grateful for any feedback. If you have proposals to increase readability and making such statements easier to find, please don't hesitate to tell us. It is really hard for us to fix readability issues - we know that something is written somewhere, which makes it easier to find 🙄 Thanks in advance |
Let's take the following examples:
Grammatically, the requests above are correct (per the ABNF. ).
Semantically however, they are confusing and/or full of contradictions.
Is there any guidance about how OData services should handle duplicate expandItem/orderbyItem/etc. ?
The current example TripIn service does not error out, but only considers the last item. Not sure if that's intended or an oversight.
Ex: https://services.odata.org/V4/TripPinService/People?$select=UserName&$expand=Trips($select=TripId,Name),Trips($filter=Name eq 'Gradutaion trip'),Trips($filter=Name eq 'Trip in US')
The text was updated successfully, but these errors were encountered: