Skip to content
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

RetrieveFunction and UpdateAction for aggregated entities #212

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

HeikoTheissen
Copy link
Contributor

@HeikoTheissen HeikoTheissen commented Dec 15, 2022

Based on these data:

OData V2:

GET Sales?$expand=Customer,Product&$select=Customer/Country,Product/Name,Amount

OData V4:

GET Sales?$apply=groupby((Customer/Country,Product/Name),aggregate(Amount))
Customer/Country Product/Name Amount
Netherlands Paper 3
Netherlands Sugar 2
USA Coffee 12
USA Paper 5
USA Sugar 2

Copy link
Member

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a matching JSON example of an aggregation result with instance annotations.

vocabularies/Analytics.xml Outdated Show resolved Hide resolved
ralfhandl
ralfhandl previously approved these changes Dec 15, 2022
@HeikoTheissen HeikoTheissen changed the base branch from main to aggregation-cs03-release-candidate February 16, 2023 15:07
Comment on lines 43 to 48
<Parameter Name="Updates" Type="SalesModel.Sale" Nullable="false">
<Annotation Term="Core.Description" String="Aggregate entity with nested properties that are to be updated, like the body of a PATCH request" />
</Parameter>
<ReturnType Type="SalesModel.Sale" Nullable="false">
<Annotation Term="Core.Description" String="Aggregate entity with updates applied" />
</ReturnType>
Copy link
Contributor Author

@HeikoTheissen HeikoTheissen Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-nullable properties that have been aggregated away will be absent in the parameter Updates and in the return value. This is allowed by [OData-Aggr, section 3.1.1].

@HeikoTheissen HeikoTheissen changed the title UpdateAction RetrieveFunction and UpdateAction for aggregated entities Mar 16, 2023
Base automatically changed from aggregation-cs03-release-candidate to main October 20, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants