-
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
Bound actions and function overloads via container and structured type #233
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also consider the case via container on entity set or singleton without an additional property or navigation property before the action/function.
Also consider multi-segment paths for nested containment/structures
We don't have all these examples for the other cases either. Let's discuss this in the TC. |
Yes. |
Complex Type|have the type or a subtype thereof | ||
Entity Type|have the type or a subtype thereof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MySchema.MyEntityType/MySchema.MyAction(MySchema.MyEntityType)
is equivalent to MySchema.MyAction(MySchema.MyEntityType)
but
MySchema.MyEntityType/MySchema.MyAction
has a meaning of its own. Is it OK to allow both?
What about targets like
? |
A binding parameter is "addressed via a resource path" if the path expression addressing the | ||
binding parameter starts with the resource path, it may then continue with segments | ||
described in [OData-URL](#ODataURL), sections 4.6 through 4.12. If the resource path | ||
addresses a collection, the binding parameter can also be a single instance of that | ||
collection if a segment described in [OData-URL](#ODataURL), sections 4.9 and 4.10, follows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the annotation target
MySchema.MyContainer/MyEntitySet/MySchema.MyAction
address the bound action
POST MyEntitySet/MySchema.MyComposableFunction()/MySchema.MyAction
even if the composable function returns a different entity set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect that it does not, instead I'd expect that annotations for target
MySchema.MyContainer/MyOtherEntitySet/MySchema.MyAction
apply if function MySchema.MyComposableFunction
returns entities from MyOtherEntitySet
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead I'd expect that annotations for target
MySchema.MyContainer/MyOtherEntitySet/MySchema.MyAction
apply if functionMySchema.MyComposableFunction
returns entities fromMyOtherEntitySet
.
Which is the case according to the first table row:
Model element | means the binding parameter must be |
---|---|
Entity Set | an instance or collection of instances from the entity set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the target
MySchema.MyContainer/MyOtherEntitySet/MyContainmentNavigationProperty/MySchema.MyAction
would not apply if the composable function returned entities from the contained entity set.
Must we distinguish between containment and non-containment navigation properties? Currently we have only
Model element | means the binding parameter must be |
---|---|
Navigation Property via container | addressed via a resource path to the navigation property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the function returns totally unrelated entities, we can't express that (yet) in $metadata.
If the function returns related entities and is defined with
EntitySetPath="__it/_otherEntity/MyContainmentNavigationProperty"
then the client could figure out look for annotations with target
MySchema.MyContainer/MyOtherEntitySet/MyContainmentNavigationProperty/MySchema.MyAction
That is asking a lot, and I feel we are down a very exotic rabbit hole.
https://issues.oasis-open.org/browse/ODATA-1626
Path evaluation rules are already covered by the paragraph